@openrewrite/recipes-angular 1.16.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/dist/index.d.ts +12 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +83 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/libraries/cdk/find-cdk-signature-changes.d.ts +48 -0
  6. package/dist/libraries/cdk/find-cdk-signature-changes.d.ts.map +1 -0
  7. package/dist/libraries/cdk/find-cdk-signature-changes.js +323 -0
  8. package/dist/libraries/cdk/find-cdk-signature-changes.js.map +1 -0
  9. package/dist/libraries/cdk/find-removed-cdk-apis.d.ts +32 -0
  10. package/dist/libraries/cdk/find-removed-cdk-apis.d.ts.map +1 -0
  11. package/dist/libraries/cdk/find-removed-cdk-apis.js +75 -0
  12. package/dist/libraries/cdk/find-removed-cdk-apis.js.map +1 -0
  13. package/dist/libraries/cdk/migrate-cdk-sass-imports.d.ts +17 -0
  14. package/dist/libraries/cdk/migrate-cdk-sass-imports.d.ts.map +1 -0
  15. package/dist/libraries/cdk/migrate-cdk-sass-imports.js +177 -0
  16. package/dist/libraries/cdk/migrate-cdk-sass-imports.js.map +1 -0
  17. package/dist/libraries/cdk/migrate-cdk-stepper.d.ts +8 -0
  18. package/dist/libraries/cdk/migrate-cdk-stepper.d.ts.map +1 -0
  19. package/dist/libraries/cdk/migrate-cdk-stepper.js +92 -0
  20. package/dist/libraries/cdk/migrate-cdk-stepper.js.map +1 -0
  21. package/dist/libraries/cdk/migrate-deprecated-overlay-sass.d.ts +9 -0
  22. package/dist/libraries/cdk/migrate-deprecated-overlay-sass.d.ts.map +1 -0
  23. package/dist/libraries/cdk/migrate-deprecated-overlay-sass.js +57 -0
  24. package/dist/libraries/cdk/migrate-deprecated-overlay-sass.js.map +1 -0
  25. package/dist/libraries/cdk/migrate-drag-drop-registry.d.ts +8 -0
  26. package/dist/libraries/cdk/migrate-drag-drop-registry.d.ts.map +1 -0
  27. package/dist/libraries/cdk/migrate-drag-drop-registry.js +118 -0
  28. package/dist/libraries/cdk/migrate-drag-drop-registry.js.map +1 -0
  29. package/dist/libraries/cdk/migrate-focus-trap-factory-create.d.ts +8 -0
  30. package/dist/libraries/cdk/migrate-focus-trap-factory-create.d.ts.map +1 -0
  31. package/dist/libraries/cdk/migrate-focus-trap-factory-create.js +74 -0
  32. package/dist/libraries/cdk/migrate-focus-trap-factory-create.js.map +1 -0
  33. package/dist/libraries/cdk/remove-cdk-super-arguments.d.ts +8 -0
  34. package/dist/libraries/cdk/remove-cdk-super-arguments.d.ts.map +1 -0
  35. package/dist/libraries/cdk/remove-cdk-super-arguments.js +111 -0
  36. package/dist/libraries/cdk/remove-cdk-super-arguments.js.map +1 -0
  37. package/dist/libraries/cdk/remove-portal-factory-resolver-arguments.d.ts +8 -0
  38. package/dist/libraries/cdk/remove-portal-factory-resolver-arguments.d.ts.map +1 -0
  39. package/dist/libraries/cdk/remove-portal-factory-resolver-arguments.js +108 -0
  40. package/dist/libraries/cdk/remove-portal-factory-resolver-arguments.js.map +1 -0
  41. package/dist/libraries/cdk/remove-tilde-from-stylesheet-imports.d.ts +8 -0
  42. package/dist/libraries/cdk/remove-tilde-from-stylesheet-imports.d.ts.map +1 -0
  43. package/dist/libraries/cdk/remove-tilde-from-stylesheet-imports.js +27 -0
  44. package/dist/libraries/cdk/remove-tilde-from-stylesheet-imports.js.map +1 -0
  45. package/dist/libraries/cdk/rename-portal-template-selectors.d.ts +27 -0
  46. package/dist/libraries/cdk/rename-portal-template-selectors.d.ts.map +1 -0
  47. package/dist/libraries/cdk/rename-portal-template-selectors.js +75 -0
  48. package/dist/libraries/cdk/rename-portal-template-selectors.js.map +1 -0
  49. package/dist/libraries/cdk/upgrade-to-cdk.d.ts +38 -0
  50. package/dist/libraries/cdk/upgrade-to-cdk.d.ts.map +1 -0
  51. package/dist/libraries/cdk/upgrade-to-cdk.js +173 -0
  52. package/dist/libraries/cdk/upgrade-to-cdk.js.map +1 -0
  53. package/dist/libraries/components/lst.d.ts +9 -0
  54. package/dist/libraries/components/lst.d.ts.map +1 -0
  55. package/dist/libraries/components/lst.js +37 -0
  56. package/dist/libraries/components/lst.js.map +1 -0
  57. package/dist/libraries/components/stylesheets.d.ts +13 -0
  58. package/dist/libraries/components/stylesheets.d.ts.map +1 -0
  59. package/dist/libraries/components/stylesheets.js +71 -0
  60. package/dist/libraries/components/stylesheets.js.map +1 -0
  61. package/dist/libraries/components/symbols.d.ts +27 -0
  62. package/dist/libraries/components/symbols.d.ts.map +1 -0
  63. package/dist/libraries/components/symbols.js +120 -0
  64. package/dist/libraries/components/symbols.js.map +1 -0
  65. package/dist/libraries/components/templates.d.ts +24 -0
  66. package/dist/libraries/components/templates.d.ts.map +1 -0
  67. package/dist/libraries/components/templates.js +141 -0
  68. package/dist/libraries/components/templates.js.map +1 -0
  69. package/dist/libraries/primeng/18/mark-deprecated-components.d.ts.map +1 -1
  70. package/dist/libraries/primeng/18/mark-deprecated-components.js +9 -5
  71. package/dist/libraries/primeng/18/mark-deprecated-components.js.map +1 -1
  72. package/dist/migration/add-trust-proxy-headers.d.ts.map +1 -1
  73. package/dist/migration/add-trust-proxy-headers.js +2 -1
  74. package/dist/migration/add-trust-proxy-headers.js.map +1 -1
  75. package/dist/migration/replace-initial-navigation.d.ts.map +1 -1
  76. package/dist/migration/replace-initial-navigation.js +2 -2
  77. package/dist/migration/replace-initial-navigation.js.map +1 -1
  78. package/dist/migration/update-component-template-url.js +1 -1
  79. package/dist/migration/update-component-template-url.js.map +1 -1
  80. package/dist/migration/upgrade-to-angular-13.d.ts.map +1 -1
  81. package/dist/migration/upgrade-to-angular-13.js +2 -0
  82. package/dist/migration/upgrade-to-angular-13.js.map +1 -1
  83. package/dist/migration/upgrade-to-angular-14.d.ts.map +1 -1
  84. package/dist/migration/upgrade-to-angular-14.js +2 -0
  85. package/dist/migration/upgrade-to-angular-14.js.map +1 -1
  86. package/dist/migration/upgrade-to-angular-17.d.ts.map +1 -1
  87. package/dist/migration/upgrade-to-angular-17.js +2 -0
  88. package/dist/migration/upgrade-to-angular-17.js.map +1 -1
  89. package/dist/migration/upgrade-to-angular-20.d.ts.map +1 -1
  90. package/dist/migration/upgrade-to-angular-20.js +2 -0
  91. package/dist/migration/upgrade-to-angular-20.js.map +1 -1
  92. package/dist/migration/upgrade-to-angular-21.d.ts.map +1 -1
  93. package/dist/migration/upgrade-to-angular-21.js +2 -0
  94. package/dist/migration/upgrade-to-angular-21.js.map +1 -1
  95. package/dist/migration/upgrade-to-angular-22.d.ts.map +1 -1
  96. package/dist/migration/upgrade-to-angular-22.js +2 -0
  97. package/dist/migration/upgrade-to-angular-22.js.map +1 -1
  98. package/package.json +2 -2
  99. package/src/index.ts +97 -0
  100. package/src/libraries/cdk/find-cdk-signature-changes.ts +209 -0
  101. package/src/libraries/cdk/find-removed-cdk-apis.ts +76 -0
  102. package/src/libraries/cdk/migrate-cdk-sass-imports.ts +174 -0
  103. package/src/libraries/cdk/migrate-cdk-stepper.ts +58 -0
  104. package/src/libraries/cdk/migrate-deprecated-overlay-sass.ts +56 -0
  105. package/src/libraries/cdk/migrate-drag-drop-registry.ts +79 -0
  106. package/src/libraries/cdk/migrate-focus-trap-factory-create.ts +51 -0
  107. package/src/libraries/cdk/remove-cdk-super-arguments.ts +83 -0
  108. package/src/libraries/cdk/remove-portal-factory-resolver-arguments.ts +88 -0
  109. package/src/libraries/cdk/remove-tilde-from-stylesheet-imports.ts +22 -0
  110. package/src/libraries/cdk/rename-portal-template-selectors.ts +51 -0
  111. package/src/libraries/cdk/upgrade-to-cdk.ts +146 -0
  112. package/src/libraries/components/lst.ts +33 -0
  113. package/src/libraries/components/stylesheets.ts +55 -0
  114. package/src/libraries/components/symbols.ts +116 -0
  115. package/src/libraries/components/templates.ts +126 -0
  116. package/src/libraries/primeng/18/mark-deprecated-components.ts +8 -4
  117. package/src/migration/add-trust-proxy-headers.ts +2 -1
  118. package/src/migration/replace-initial-navigation.ts +3 -1
  119. package/src/migration/update-component-template-url.ts +1 -1
  120. package/src/migration/upgrade-to-angular-13.ts +2 -0
  121. package/src/migration/upgrade-to-angular-14.ts +2 -0
  122. package/src/migration/upgrade-to-angular-17.ts +2 -0
  123. package/src/migration/upgrade-to-angular-20.ts +2 -0
  124. package/src/migration/upgrade-to-angular-21.ts +2 -0
  125. package/src/migration/upgrade-to-angular-22.ts +2 -0
@@ -0,0 +1,126 @@
1
+ /*
2
+ * Copyright 2026 the original author or authors.
3
+ *
4
+ * Moderne Proprietary. Only for use by Moderne customers under the terms of a commercial contract.
5
+ */
6
+
7
+ import {Cursor, ExecutionContext, Recipe, Tree, TreeVisitor} from "@openrewrite/rewrite";
8
+ import {PlainText, PlainTextVisitor} from "@openrewrite/rewrite/text";
9
+ import {JavaScriptVisitor} from "@openrewrite/rewrite/javascript";
10
+ import {isIdentifier, isLiteral, J} from "@openrewrite/rewrite/java";
11
+ import {create} from "mutative";
12
+ import {escapeRegExp} from "./stylesheets";
13
+
14
+ /** A directive selector or input that a major version renamed, as it appears in a template attribute. */
15
+ export interface TemplateAttributeRename {
16
+ name: string;
17
+ newName: string;
18
+ /** Restricts the rename to elements with this tag name. */
19
+ element?: string;
20
+ }
21
+
22
+ /** A directive `exportAs` name that a major version renamed, as it appears in a template reference variable. */
23
+ export interface TemplateExportAsRename {
24
+ name: string;
25
+ newName: string;
26
+ }
27
+
28
+ /**
29
+ * Renames attributes and `exportAs` references in `.html` templates and in inline `template` metadata.
30
+ */
31
+ export abstract class RenameTemplateAttributes extends Recipe {
32
+ protected abstract readonly attributes: TemplateAttributeRename[];
33
+ protected readonly exportAs: TemplateExportAsRename[] = [];
34
+
35
+ async editor(): Promise<TreeVisitor<any, ExecutionContext>> {
36
+ const migrate = (template: string) => renameTemplateAttributes(template, this.attributes, this.exportAs);
37
+ const html = new class extends PlainTextVisitor<ExecutionContext> {
38
+ override async visitText(text: PlainText, p: ExecutionContext): Promise<PlainText | undefined> {
39
+ const t = await super.visitText(text, p) as PlainText;
40
+ if (!t || !t.sourcePath.endsWith('.html')) return t;
41
+ const updated = migrate(t.text);
42
+ return updated === t.text ? t : {...t, text: updated, snippets: []};
43
+ }
44
+ }();
45
+ const inline = new class extends JavaScriptVisitor<ExecutionContext> {
46
+ protected async visitPropertyAssignment(property: any, p: ExecutionContext): Promise<J | undefined> {
47
+ const prop = await super.visitPropertyAssignment(property, p) as any;
48
+ const name = prop?.name?.element;
49
+ if (!isIdentifier(name) || name.simpleName !== 'template') return prop;
50
+
51
+ const initializer = prop.initializer;
52
+ if (!initializer || !isLiteral(initializer) || typeof initializer.value !== 'string') return prop;
53
+ const valueSource = migrate(initializer.valueSource ?? '');
54
+ if (valueSource === initializer.valueSource) return prop;
55
+
56
+ return create(prop, (draft: any) => {
57
+ draft.initializer.valueSource = valueSource;
58
+ draft.initializer.value = migrate(initializer.value as string);
59
+ });
60
+ }
61
+ }();
62
+ // Each visitor returns a source file it does not accept unchanged.
63
+ return new class extends TreeVisitor<any, ExecutionContext> {
64
+ async visit<R extends Tree>(tree: Tree, p: ExecutionContext, parent?: Cursor): Promise<R | undefined> {
65
+ const visited = await html.visit<Tree>(tree, p, parent);
66
+ return visited && await inline.visit(visited, p, parent) as R | undefined;
67
+ }
68
+ }();
69
+ }
70
+ }
71
+
72
+ /** Renames attributes inside opening tags and `exportAs` values of reference variables. */
73
+ export function renameTemplateAttributes(template: string, attributes: TemplateAttributeRename[],
74
+ exportAs: TemplateExportAsRename[] = []): string {
75
+ if (![...attributes, ...exportAs].some(r => template.includes(r.name))) return template;
76
+ return mapOpeningTags(template, (tagName, attrs) => {
77
+ let updated = attrs;
78
+ for (const rename of attributes) {
79
+ if (rename.element && rename.element !== tagName) continue;
80
+ updated = renameAttribute(updated, rename.name, rename.newName);
81
+ }
82
+ for (const rename of exportAs) {
83
+ updated = updated.replace(
84
+ new RegExp(`((?:^|\\s)(?:#|ref-)[\\w-]+\\s*=\\s*)(["'])${escapeRegExp(rename.name)}\\2`, 'g'),
85
+ `$1$2${rename.newName}$2`);
86
+ }
87
+ return updated;
88
+ });
89
+ }
90
+
91
+ /** Renames a plain, `[input]`, `(output)`, `[(model)]` or `*structural` attribute, leaving attribute values alone. */
92
+ function renameAttribute(attrs: string, name: string, newName: string): string {
93
+ const pattern = new RegExp(`(^|\\s)(\\[\\(|\\[|\\(|\\*)?${escapeRegExp(name)}(?=[\\s=\\])/]|$)`, 'g');
94
+ return mapOutsideQuotes(attrs, segment => segment.replace(pattern, `$1$2${newName}`));
95
+ }
96
+
97
+ /** Calls `fn` for the attribute text of every opening tag, honoring quoted attribute values that contain `>`. */
98
+ function mapOpeningTags(template: string, fn: (tagName: string, attrs: string) => string): string {
99
+ let result = '';
100
+ let index = 0;
101
+ const tagStart = /<([a-zA-Z][\w-]*)/g;
102
+ let match: RegExpExecArray | null;
103
+ while ((match = tagStart.exec(template)) !== null) {
104
+ const attrsStart = match.index + match[0].length;
105
+ let quote: string | undefined;
106
+ let end = attrsStart;
107
+ for (; end < template.length; end++) {
108
+ const c = template[end];
109
+ if (quote) {
110
+ if (c === quote) quote = undefined;
111
+ } else if (c === '"' || c === "'") {
112
+ quote = c;
113
+ } else if (c === '>') {
114
+ break;
115
+ }
116
+ }
117
+ result += template.slice(index, attrsStart) + fn(match[1], template.slice(attrsStart, end));
118
+ index = end;
119
+ tagStart.lastIndex = end;
120
+ }
121
+ return result + template.slice(index);
122
+ }
123
+
124
+ function mapOutsideQuotes(text: string, fn: (segment: string) => string): string {
125
+ return text.split(/("[^"]*"|'[^']*')/).map((part, i) => i % 2 === 0 ? fn(part) : part).join('');
126
+ }
@@ -77,9 +77,13 @@ export class MarkDeprecatedPrimengComponents extends Recipe {
77
77
  const deprecation = DEPRECATED_MODULES[moduleName];
78
78
  if (!deprecation) return imp;
79
79
 
80
- // Idempotence: skip if our TODO marker is already attached.
80
+ // Idempotence: skip if our TODO marker is already attached. Comments leading the
81
+ // file's first statement are parsed into the compilation unit's prefix instead.
81
82
  const existingComments = imp.prefix?.comments ?? [];
82
- if (existingComments.some(c => (c as any).text?.includes('TODO: PrimeNG 18'))) {
83
+ const cu = this.cursor.firstEnclosing<JS.CompilationUnit>((o: any): o is JS.CompilationUnit => o?.kind === JS.Kind.CompilationUnit);
84
+ const fileLeadingComments = cu?.statements[0]?.element.id === imp.id ? cu.prefix.comments : [];
85
+ const todoMarker = `TODO: PrimeNG 18 — ${deprecation.todo}`;
86
+ if ([...existingComments, ...fileLeadingComments].some(c => (c as any).text?.includes(todoMarker))) {
83
87
  return imp;
84
88
  }
85
89
 
@@ -95,7 +99,7 @@ export class MarkDeprecatedPrimengComponents extends Recipe {
95
99
  }
96
100
  if (importedNames.length === 0) return imp;
97
101
 
98
- const sourcePath = (this.cursor.firstEnclosing<any>((o: any): o is any => !!o?.sourcePath)?.sourcePath) ?? '';
102
+ const sourcePath = cu?.sourcePath ?? '';
99
103
  for (const name of importedNames) {
100
104
  dataTable.insertRow(p, {
101
105
  sourcePath,
@@ -109,7 +113,7 @@ export class MarkDeprecatedPrimengComponents extends Recipe {
109
113
  const todoComment = {
110
114
  kind: J.Kind.TextComment,
111
115
  multiline: true,
112
- text: ` TODO: PrimeNG 18 — ${deprecation.todo} (import: \`{ ${importedNames.join(', ')} } from '${moduleName}'\`) `,
116
+ text: ` ${todoMarker} (import: \`{ ${importedNames.join(', ')} } from '${moduleName}'\`) `,
113
117
  suffix: '\n',
114
118
  markers: {kind: 'org.openrewrite.marker.Markers', id: imp.id, markers: []},
115
119
  };
@@ -40,7 +40,8 @@ export class AddTrustProxyHeaders extends Recipe {
40
40
 
41
41
  let builder = Template.builder().code(`new ${engine}({\n ${TODO_COMMENT}\n trustProxyHeaders: ['x-forwarded-host', 'x-forwarded-proto'],`);
42
42
  for (const statement of existing) {
43
- builder = builder.code('\n ').param(statement.element).code(',');
43
+ // As a list, the option takes the place of the template's property rather than becoming its name
44
+ builder = builder.code('\n ').param([statement.element]).code(',');
44
45
  }
45
46
  const t = builder.code('\n})').build();
46
47
  return await t.apply(n, this.cursor);
@@ -6,7 +6,7 @@
6
6
 
7
7
  import {ExecutionContext, Recipe, TreeVisitor} from "@openrewrite/rewrite";
8
8
  import {JavaScriptVisitor, JS} from "@openrewrite/rewrite/javascript";
9
- import {J, isIdentifier, isLiteral} from "@openrewrite/rewrite/java";
9
+ import {J, isIdentifier, isLiteral, Type} from "@openrewrite/rewrite/java";
10
10
  import {create} from "mutative";
11
11
 
12
12
  export class ReplaceInitialNavigation extends Recipe {
@@ -52,6 +52,7 @@ export class ReplaceInitialNavigation extends Recipe {
52
52
  ...lit,
53
53
  value: 'enabledBlocking',
54
54
  valueSource: `'enabledBlocking'`,
55
+ type: Type.Primitive.String,
55
56
  };
56
57
  }) as JS.PropertyAssignment;
57
58
  }
@@ -61,6 +62,7 @@ export class ReplaceInitialNavigation extends Recipe {
61
62
  ...lit,
62
63
  value: 'disabled',
63
64
  valueSource: `'disabled'`,
65
+ type: Type.Primitive.String,
64
66
  };
65
67
  }) as JS.PropertyAssignment;
66
68
  }
@@ -41,7 +41,7 @@ export class UpdateComponentTemplateUrl extends Recipe {
41
41
 
42
42
  @Option({
43
43
  displayName: "Use regex pattern",
44
- description: "If `true`, treats `oldTemplateUrl` as a regex pattern and supports capture groups in `newTemplateUrl`. Default: `false`",
44
+ description: "If `true`, treats `oldTemplateUrl` as a regex pattern and supports capture groups in `newTemplateUrl`. The pattern should not match the new URL, or every run rewrites it again. Default: `false`",
45
45
  example: "true",
46
46
  required: false
47
47
  })
@@ -12,6 +12,7 @@ import {RemoveIePolyfills} from "./remove-ie-polyfills";
12
12
  import {RemoveDefaultProject} from "./remove-default-project";
13
13
  import {AddTestBedTeardown} from "./add-testbed-teardown";
14
14
  import {RemoveComponentFactoryResolver} from "./remove-component-factory-resolver";
15
+ import {UpgradeToCdk13CodeChanges} from "../libraries/cdk/upgrade-to-cdk";
15
16
 
16
17
  export class UpgradeToAngular13CodeChanges extends Recipe {
17
18
  readonly name = "org.openrewrite.angular.UpgradeToAngular13CodeChanges";
@@ -28,6 +29,7 @@ export class UpgradeToAngular13CodeChanges extends Recipe {
28
29
  new RemoveDefaultProject(),
29
30
  new AddTestBedTeardown(),
30
31
  new RemoveComponentFactoryResolver(),
32
+ new UpgradeToCdk13CodeChanges(),
31
33
  ];
32
34
  }
33
35
  }
@@ -10,6 +10,7 @@ import {UpgradeToAngular13CodeChanges} from "./upgrade-to-angular-13";
10
10
  import {ReplaceUntypedForms} from "./replace-untyped-forms";
11
11
  import {RemoveAotSummaries} from "./remove-aot-summaries";
12
12
  import {FindPathMatchTypeUsage} from "../search/find-path-match-type-usage";
13
+ import {UpgradeToCdk14CodeChanges} from "../libraries/cdk/upgrade-to-cdk";
13
14
 
14
15
  export class UpgradeToAngular14CodeChanges extends Recipe {
15
16
  readonly name = "org.openrewrite.angular.UpgradeToAngular14CodeChanges";
@@ -25,6 +26,7 @@ export class UpgradeToAngular14CodeChanges extends Recipe {
25
26
  new RemoveAotSummaries(),
26
27
  // Search: type changes
27
28
  new FindPathMatchTypeUsage(),
29
+ new UpgradeToCdk14CodeChanges(),
28
30
  ];
29
31
  }
30
32
  }
@@ -10,6 +10,7 @@ import {UpgradeToAngular16CodeChanges} from "./upgrade-to-angular-16";
10
10
  import {ReplaceDeepZoneJsImports} from "./replace-deep-zone-js-imports";
11
11
  import {FindWithNoDomReuseUsage} from "../search/find-with-no-dom-reuse-usage";
12
12
  import {FindSetupTestingRouterUsage} from "../search/find-setup-testing-router-usage";
13
+ import {UpgradeToCdk17CodeChanges} from "../libraries/cdk/upgrade-to-cdk";
13
14
 
14
15
  export class UpgradeToAngular17CodeChanges extends Recipe {
15
16
  readonly name = "org.openrewrite.angular.UpgradeToAngular17CodeChanges";
@@ -25,6 +26,7 @@ export class UpgradeToAngular17CodeChanges extends Recipe {
25
26
  // Search: removed APIs
26
27
  new FindWithNoDomReuseUsage(),
27
28
  new FindSetupTestingRouterUsage(),
29
+ new UpgradeToCdk17CodeChanges(),
28
30
  ];
29
31
  }
30
32
  }
@@ -14,6 +14,7 @@ import {ReplaceInjectFlags} from "./replace-inject-flags";
14
14
  import {MoveDocumentImport} from "./move-document-to-core";
15
15
  import {RemoveStandaloneTrue} from "./remove-standalone-true";
16
16
  import {RemoveZoneJsPolyfill} from "./remove-zone-js-polyfill";
17
+ import {UpgradeToCdk20CodeChanges} from "../libraries/cdk/upgrade-to-cdk";
17
18
 
18
19
  export class UpgradeToAngular20CodeChanges extends Recipe {
19
20
  readonly name = "org.openrewrite.angular.UpgradeToAngular20CodeChanges";
@@ -32,6 +33,7 @@ export class UpgradeToAngular20CodeChanges extends Recipe {
32
33
  new MoveDocumentImport(),
33
34
  new RemoveStandaloneTrue(),
34
35
  new RemoveZoneJsPolyfill(),
36
+ new UpgradeToCdk20CodeChanges(),
35
37
  ];
36
38
  }
37
39
  }
@@ -17,6 +17,7 @@ import {MigrateInputToSignal} from "./migrate-input-to-signal";
17
17
  import {MigrateOutputToSignal} from "./migrate-output-to-signal";
18
18
  import {MigrateQueryToSignal} from "./migrate-query-to-signal";
19
19
  import {SetTsconfigModuleResolutionBundler} from "./set-tsconfig-module-resolution-bundler";
20
+ import {UpgradeToCdk21CodeChanges} from "../libraries/cdk/upgrade-to-cdk";
20
21
 
21
22
  export class UpgradeToAngular21CodeChanges extends Recipe {
22
23
  readonly name = "org.openrewrite.angular.UpgradeToAngular21CodeChanges";
@@ -40,6 +41,7 @@ export class UpgradeToAngular21CodeChanges extends Recipe {
40
41
  new MigrateQueryToSignal(),
41
42
  // tsconfig
42
43
  new SetTsconfigModuleResolutionBundler(),
44
+ new UpgradeToCdk21CodeChanges(),
43
45
  ];
44
46
  }
45
47
  }
@@ -25,6 +25,7 @@ import {FindTemplateSafeNavigation} from "../search/find-template-safe-navigatio
25
25
  import {ReplaceCreateNgModuleRef} from "./replace-create-ng-module-ref";
26
26
  import {RenameAngularJsGlobals} from "./rename-angular-js-globals";
27
27
  import {RenameSsrExperimentalPlatform} from "./rename-ssr-experimental-platform";
28
+ import {UpgradeToCdk22CodeChanges} from "../libraries/cdk/upgrade-to-cdk";
28
29
 
29
30
  export class UpgradeToAngular22CodeChanges extends Recipe {
30
31
  readonly name = "org.openrewrite.angular.UpgradeToAngular22CodeChanges";
@@ -60,6 +61,7 @@ export class UpgradeToAngular22CodeChanges extends Recipe {
60
61
  new MigrateModelWithOutput(),
61
62
  new ReplaceCreateNgModuleRef(),
62
63
  new RenameAngularJsGlobals(),
64
+ new UpgradeToCdk22CodeChanges(),
63
65
  ];
64
66
  }
65
67
  }