@openrewrite/recipes-react 0.28.0 → 0.31.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 (138) hide show
  1. package/dist/change-react-type.d.ts +14 -0
  2. package/dist/change-react-type.d.ts.map +1 -0
  3. package/dist/change-react-type.js +41 -0
  4. package/dist/change-react-type.js.map +1 -0
  5. package/dist/index.d.ts +16 -0
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +67 -2
  8. package/dist/index.js.map +1 -1
  9. package/dist/react18/add-children-to-props.d.ts.map +1 -1
  10. package/dist/react18/add-children-to-props.js +24 -6
  11. package/dist/react18/add-children-to-props.js.map +1 -1
  12. package/dist/react18/deprecated-react-type.d.ts +8 -0
  13. package/dist/react18/deprecated-react-type.d.ts.map +1 -0
  14. package/dist/react18/deprecated-react-type.js +29 -0
  15. package/dist/react18/deprecated-react-type.js.map +1 -0
  16. package/dist/react18/deprecated-sfc-element.d.ts +8 -0
  17. package/dist/react18/deprecated-sfc-element.d.ts.map +1 -0
  18. package/dist/react18/deprecated-sfc-element.js +29 -0
  19. package/dist/react18/deprecated-sfc-element.js.map +1 -0
  20. package/dist/react18/deprecated-sfc.d.ts +8 -0
  21. package/dist/react18/deprecated-sfc.d.ts.map +1 -0
  22. package/dist/react18/deprecated-sfc.js +29 -0
  23. package/dist/react18/deprecated-sfc.js.map +1 -0
  24. package/dist/react18/deprecated-stateless-component.d.ts +8 -0
  25. package/dist/react18/deprecated-stateless-component.d.ts.map +1 -0
  26. package/dist/react18/deprecated-stateless-component.js +29 -0
  27. package/dist/react18/deprecated-stateless-component.js.map +1 -0
  28. package/dist/react19/deprecated-legacy-ref.d.ts +8 -0
  29. package/dist/react19/deprecated-legacy-ref.d.ts.map +1 -0
  30. package/dist/react19/deprecated-legacy-ref.js +29 -0
  31. package/dist/react19/deprecated-legacy-ref.js.map +1 -0
  32. package/dist/react19/deprecated-prop-types-types.d.ts +23 -0
  33. package/dist/react19/deprecated-prop-types-types.d.ts.map +1 -0
  34. package/dist/react19/deprecated-prop-types-types.js +191 -0
  35. package/dist/react19/deprecated-prop-types-types.js.map +1 -0
  36. package/dist/react19/deprecated-react-child.d.ts +8 -0
  37. package/dist/react19/deprecated-react-child.d.ts.map +1 -0
  38. package/dist/react19/deprecated-react-child.js +91 -0
  39. package/dist/react19/deprecated-react-child.js.map +1 -0
  40. package/dist/react19/deprecated-react-fragment.d.ts +8 -0
  41. package/dist/react19/deprecated-react-fragment.d.ts.map +1 -0
  42. package/dist/react19/deprecated-react-fragment.js +92 -0
  43. package/dist/react19/deprecated-react-fragment.js.map +1 -0
  44. package/dist/react19/deprecated-react-node-array.d.ts +8 -0
  45. package/dist/react19/deprecated-react-node-array.d.ts.map +1 -0
  46. package/dist/react19/deprecated-react-node-array.js +92 -0
  47. package/dist/react19/deprecated-react-node-array.js.map +1 -0
  48. package/dist/react19/deprecated-react-text.d.ts +8 -0
  49. package/dist/react19/deprecated-react-text.d.ts.map +1 -0
  50. package/dist/react19/deprecated-react-text.js +91 -0
  51. package/dist/react19/deprecated-react-text.js.map +1 -0
  52. package/dist/react19/deprecated-react-types.d.ts.map +1 -1
  53. package/dist/react19/deprecated-react-types.js +3 -104
  54. package/dist/react19/deprecated-react-types.js.map +1 -1
  55. package/dist/react19/deprecated-void-function-component.d.ts +8 -0
  56. package/dist/react19/deprecated-void-function-component.d.ts.map +1 -0
  57. package/dist/react19/deprecated-void-function-component.js +32 -0
  58. package/dist/react19/deprecated-void-function-component.js.map +1 -0
  59. package/dist/react19/refobject-defaults.d.ts +13 -0
  60. package/dist/react19/refobject-defaults.d.ts.map +1 -0
  61. package/dist/react19/refobject-defaults.js +152 -0
  62. package/dist/react19/refobject-defaults.js.map +1 -0
  63. package/dist/react19/remove-react-fc.js +3 -2
  64. package/dist/react19/remove-react-fc.js.map +1 -1
  65. package/dist/react19/replace-act-import.d.ts +8 -0
  66. package/dist/react19/replace-act-import.d.ts.map +1 -0
  67. package/dist/react19/replace-act-import.js +29 -0
  68. package/dist/react19/replace-act-import.js.map +1 -0
  69. package/dist/react19/replace-react-shallow-renderer.d.ts +8 -0
  70. package/dist/react19/replace-react-shallow-renderer.d.ts.map +1 -0
  71. package/dist/react19/replace-react-shallow-renderer.js +29 -0
  72. package/dist/react19/replace-react-shallow-renderer.js.map +1 -0
  73. package/dist/react19/replace-use-form-state.d.ts +8 -0
  74. package/dist/react19/replace-use-form-state.d.ts.map +1 -0
  75. package/dist/react19/replace-use-form-state.js +29 -0
  76. package/dist/react19/replace-use-form-state.js.map +1 -0
  77. package/dist/types/imports.d.ts +31 -0
  78. package/dist/types/imports.d.ts.map +1 -0
  79. package/dist/types/imports.js +385 -0
  80. package/dist/types/imports.js.map +1 -0
  81. package/dist/types/index.d.ts +11 -0
  82. package/dist/types/index.d.ts.map +1 -0
  83. package/dist/types/index.js +33 -0
  84. package/dist/types/index.js.map +1 -0
  85. package/dist/types/module.d.ts +6 -0
  86. package/dist/types/module.d.ts.map +1 -0
  87. package/dist/types/module.js +5 -0
  88. package/dist/types/module.js.map +1 -0
  89. package/dist/types/re-export.d.ts +5 -0
  90. package/dist/types/re-export.d.ts.map +1 -0
  91. package/dist/types/re-export.js +12 -0
  92. package/dist/types/re-export.js.map +1 -0
  93. package/dist/types/reference.d.ts +20 -0
  94. package/dist/types/reference.d.ts.map +1 -0
  95. package/dist/types/reference.js +161 -0
  96. package/dist/types/reference.js.map +1 -0
  97. package/dist/types/rename.d.ts +10 -0
  98. package/dist/types/rename.d.ts.map +1 -0
  99. package/dist/types/rename.js +136 -0
  100. package/dist/types/rename.js.map +1 -0
  101. package/dist/types/replace.d.ts +8 -0
  102. package/dist/types/replace.d.ts.map +1 -0
  103. package/dist/types/replace.js +122 -0
  104. package/dist/types/replace.js.map +1 -0
  105. package/dist/util/java-recipe-proxy.d.ts +1 -0
  106. package/dist/util/java-recipe-proxy.d.ts.map +1 -1
  107. package/dist/util/java-recipe-proxy.js +3 -1
  108. package/dist/util/java-recipe-proxy.js.map +1 -1
  109. package/package.json +2 -2
  110. package/src/change-react-type.ts +32 -0
  111. package/src/index.ts +48 -0
  112. package/src/migration/cra-to-vite/add-vite-config.ts +0 -1
  113. package/src/react18/add-children-to-props.ts +22 -7
  114. package/src/react18/deprecated-react-type.ts +19 -0
  115. package/src/react18/deprecated-sfc-element.ts +19 -0
  116. package/src/react18/deprecated-sfc.ts +19 -0
  117. package/src/react18/deprecated-stateless-component.ts +19 -0
  118. package/src/react19/deprecated-legacy-ref.ts +19 -0
  119. package/src/react19/deprecated-prop-types-types.ts +170 -0
  120. package/src/react19/deprecated-react-child.ts +67 -0
  121. package/src/react19/deprecated-react-fragment.ts +74 -0
  122. package/src/react19/deprecated-react-node-array.ts +74 -0
  123. package/src/react19/deprecated-react-text.ts +66 -0
  124. package/src/react19/deprecated-react-types.ts +4 -95
  125. package/src/react19/deprecated-void-function-component.ts +22 -0
  126. package/src/react19/refobject-defaults.ts +120 -0
  127. package/src/react19/remove-react-fc.ts +3 -3
  128. package/src/react19/replace-act-import.ts +19 -0
  129. package/src/react19/replace-react-shallow-renderer.ts +19 -0
  130. package/src/react19/replace-use-form-state.ts +19 -0
  131. package/src/types/imports.ts +396 -0
  132. package/src/types/index.ts +21 -0
  133. package/src/types/module.ts +10 -0
  134. package/src/types/re-export.ts +14 -0
  135. package/src/types/reference.ts +186 -0
  136. package/src/types/rename.ts +112 -0
  137. package/src/types/replace.ts +123 -0
  138. package/src/util/java-recipe-proxy.ts +3 -0
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DeprecatedStatelessComponent = void 0;
13
+ const rewrite_1 = require("@openrewrite/rewrite");
14
+ const change_react_type_1 = require("../change-react-type");
15
+ class DeprecatedStatelessComponent extends rewrite_1.Recipe {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.name = "org.openrewrite.react.18.deprecated-stateless-component";
19
+ this.displayName = "Replace `StatelessComponent` with `FunctionComponent`";
20
+ this.description = "Renames React's deprecated `StatelessComponent` type to `FunctionComponent`, keeping its type arguments, as `@types/react` 18 removed it. Only references to React's own type are renamed, so another library's `StatelessComponent` (such as `ink`'s) stays.";
21
+ }
22
+ recipeList() {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ return [new change_react_type_1.ChangeReactType({ oldTypeName: "StatelessComponent", newTypeName: "FunctionComponent" })];
25
+ });
26
+ }
27
+ }
28
+ exports.DeprecatedStatelessComponent = DeprecatedStatelessComponent;
29
+ //# sourceMappingURL=deprecated-stateless-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated-stateless-component.js","sourceRoot":"","sources":["../../src/react18/deprecated-stateless-component.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA4C;AAC5C,4DAAqD;AASrD,MAAa,4BAA6B,SAAQ,gBAAM;IAAxD;;QACa,SAAI,GAAG,yDAAyD,CAAC;QACjE,gBAAW,GAAG,uDAAuD,CAAC;QACtE,gBAAW,GAAG,+PAA+P,CAAC;IAK3R,CAAC;IAHS,UAAU;;YACZ,OAAO,CAAC,IAAI,mCAAe,CAAC,EAAC,WAAW,EAAE,oBAAoB,EAAE,WAAW,EAAE,mBAAmB,EAAC,CAAC,CAAC,CAAC;QACxG,CAAC;KAAA;CACJ;AARD,oEAQC"}
@@ -0,0 +1,8 @@
1
+ import { Recipe } from "@openrewrite/rewrite";
2
+ export declare class DeprecatedLegacyRef extends Recipe {
3
+ readonly name = "org.openrewrite.react.19.deprecated-legacy-ref";
4
+ readonly displayName = "Replace `LegacyRef` with `Ref`";
5
+ readonly description = "Replaces React's `LegacyRef` type, deprecated in `@types/react` 19, with `Ref`, keeping its type argument.";
6
+ recipeList(): Promise<Recipe[]>;
7
+ }
8
+ //# sourceMappingURL=deprecated-legacy-ref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated-legacy-ref.d.ts","sourceRoot":"","sources":["../../src/react19/deprecated-legacy-ref.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAU5C,qBAAa,mBAAoB,SAAQ,MAAM;IAC3C,QAAQ,CAAC,IAAI,oDAAoD;IACjE,QAAQ,CAAC,WAAW,oCAAoC;IACxD,QAAQ,CAAC,WAAW,gHAAgH;IAE9H,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAGxC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DeprecatedLegacyRef = void 0;
13
+ const rewrite_1 = require("@openrewrite/rewrite");
14
+ const change_react_type_1 = require("../change-react-type");
15
+ class DeprecatedLegacyRef extends rewrite_1.Recipe {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.name = "org.openrewrite.react.19.deprecated-legacy-ref";
19
+ this.displayName = "Replace `LegacyRef` with `Ref`";
20
+ this.description = "Replaces React's `LegacyRef` type, deprecated in `@types/react` 19, with `Ref`, keeping its type argument.";
21
+ }
22
+ recipeList() {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ return [new change_react_type_1.ChangeReactType({ oldTypeName: "LegacyRef", newTypeName: "Ref" })];
25
+ });
26
+ }
27
+ }
28
+ exports.DeprecatedLegacyRef = DeprecatedLegacyRef;
29
+ //# sourceMappingURL=deprecated-legacy-ref.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated-legacy-ref.js","sourceRoot":"","sources":["../../src/react19/deprecated-legacy-ref.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA4C;AAC5C,4DAAqD;AASrD,MAAa,mBAAoB,SAAQ,gBAAM;IAA/C;;QACa,SAAI,GAAG,gDAAgD,CAAC;QACxD,gBAAW,GAAG,gCAAgC,CAAC;QAC/C,gBAAW,GAAG,4GAA4G,CAAC;IAKxI,CAAC;IAHS,UAAU;;YACZ,OAAO,CAAC,IAAI,mCAAe,CAAC,EAAC,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAC,CAAC,CAAC,CAAC;QACjF,CAAC;KAAA;CACJ;AARD,kDAQC"}
@@ -0,0 +1,23 @@
1
+ import { ExecutionContext, Recipe, SourceFile, TreeVisitor } from "@openrewrite/rewrite";
2
+ import { JavaDependencyRecipe } from "../util/java-recipe-proxy";
3
+ export declare class DeprecatedPropTypesTypes extends Recipe {
4
+ readonly name = "org.openrewrite.react.19.deprecated-prop-types-types";
5
+ readonly displayName = "Import the prop-types types from `prop-types`";
6
+ readonly description = "Moves `Requireable`, `Validator`, `ValidationMap` and `WeakValidationMap`, which `@types/react` 19 no longer exports, from `react` to `prop-types` as type-only imports, and adds `@types/prop-types` to the packages they move in.";
7
+ private readonly dependency;
8
+ editor(): Promise<TreeVisitor<any, ExecutionContext>>;
9
+ recipeList(): Promise<Recipe[]>;
10
+ }
11
+ export declare class AddTypesPropTypes extends JavaDependencyRecipe {
12
+ readonly name = "org.openrewrite.react.19.add-types-prop-types";
13
+ readonly displayName = "Add `@types/prop-types` where the prop-types types move to `prop-types`";
14
+ readonly description = "Adds `@types/prop-types` as a dev dependency to each package with a TypeScript source whose `Requireable`, `Validator`, `ValidationMap` or `WeakValidationMap` moves from `react` to `prop-types`, since `@types/react` 19 no longer depends on it.";
15
+ private readonly moving;
16
+ private readonly held;
17
+ constructor();
18
+ initialValue(): number;
19
+ scanner(acc: number): Promise<TreeVisitor<any, ExecutionContext>>;
20
+ protected scanned(manifest: SourceFile): boolean;
21
+ generate(acc: number, ctx: ExecutionContext): Promise<SourceFile[]>;
22
+ }
23
+ //# sourceMappingURL=deprecated-prop-types-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated-prop-types-types.d.ts","sourceRoot":"","sources":["../../src/react19/deprecated-prop-types-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,gBAAgB,EAAE,MAAM,EAAE,UAAU,EAAQ,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAe5G,OAAO,EAAC,oBAAoB,EAA6B,MAAM,2BAA2B,CAAC;AAc3F,qBAAa,wBAAyB,SAAQ,MAAM;IAChD,QAAQ,CAAC,IAAI,0DAA0D;IACvE,QAAQ,CAAC,WAAW,mDAAmD;IACvE,QAAQ,CAAC,WAAW,yOAAyO;IAE7P,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA2B;IAEhD,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;IAIrD,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAGxC;AAED,qBAAa,iBAAkB,SAAQ,oBAAoB;IACvD,QAAQ,CAAC,IAAI,mDAAmD;IAChE,QAAQ,CAAC,WAAW,6EAA6E;IACjG,QAAQ,CAAC,WAAW,yPAAyP;IAE7Q,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IAEvC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAoB;;IAMhC,YAAY,IAAI,MAAM;IAMhB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;cAiB7D,OAAO,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO;IAM1C,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;CAUrF"}
@@ -0,0 +1,191 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.AddTypesPropTypes = exports.DeprecatedPropTypesTypes = void 0;
13
+ const rewrite_1 = require("@openrewrite/rewrite");
14
+ const java_1 = require("@openrewrite/rewrite/java");
15
+ const javascript_1 = require("@openrewrite/rewrite/javascript");
16
+ const types_1 = require("../types");
17
+ const java_recipe_proxy_1 = require("../util/java-recipe-proxy");
18
+ const propTypes = { module: 'prop-types' };
19
+ const MOVED = ['Requireable', 'Validator', 'ValidationMap', 'WeakValidationMap'];
20
+ const TYPES_PROP_TYPES = { packageName: '@types/prop-types', version: '^15.7.15', scope: 'devDependencies' };
21
+ class DeprecatedPropTypesTypes extends rewrite_1.Recipe {
22
+ constructor() {
23
+ super(...arguments);
24
+ this.name = "org.openrewrite.react.19.deprecated-prop-types-types";
25
+ this.displayName = "Import the prop-types types from `prop-types`";
26
+ this.description = "Moves `Requireable`, `Validator`, `ValidationMap` and `WeakValidationMap`, which `@types/react` 19 no longer exports, from `react` to `prop-types` as type-only imports, and adds `@types/prop-types` to the packages they move in.";
27
+ this.dependency = new AddTypesPropTypes();
28
+ }
29
+ editor() {
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ return (0, types_1.onTypeScriptSources)(movingPropTypesTypes());
32
+ });
33
+ }
34
+ recipeList() {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ return [this.dependency];
37
+ });
38
+ }
39
+ }
40
+ exports.DeprecatedPropTypesTypes = DeprecatedPropTypesTypes;
41
+ class AddTypesPropTypes extends java_recipe_proxy_1.JavaDependencyRecipe {
42
+ constructor() {
43
+ super("org.openrewrite.javascript.AddDependency", TYPES_PROP_TYPES);
44
+ this.name = "org.openrewrite.react.19.add-types-prop-types";
45
+ this.displayName = "Add `@types/prop-types` where the prop-types types move to `prop-types`";
46
+ this.description = "Adds `@types/prop-types` as a dev dependency to each package with a TypeScript source whose `Requireable`, `Validator`, `ValidationMap` or `WeakValidationMap` moves from `react` to `prop-types`, since `@types/react` 19 no longer depends on it.";
47
+ this.moving = [];
48
+ this.held = [];
49
+ }
50
+ initialValue() {
51
+ this.moving.length = 0;
52
+ this.held.length = 0;
53
+ return super.initialValue();
54
+ }
55
+ scanner(acc) {
56
+ const _super = Object.create(null, {
57
+ scanner: { get: () => super.scanner }
58
+ });
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ const manifests = yield _super.scanner.call(this, acc);
61
+ const forecast = yield (0, types_1.onTypeScriptSources)(movingPropTypesTypes());
62
+ const moving = this.moving;
63
+ return (0, rewrite_1.check)((0, java_recipe_proxy_1.manifestAndJavaScriptTrees)(), new class extends rewrite_1.TreeVisitor {
64
+ isAcceptable() {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ return true;
67
+ });
68
+ }
69
+ visit(tree, ctx, parent) {
70
+ return __awaiter(this, void 0, void 0, function* () {
71
+ if (tree.kind !== javascript_1.JS.Kind.CompilationUnit)
72
+ return manifests.visit(tree, ctx, parent);
73
+ if ((yield forecast.visit(tree, ctx)) !== tree)
74
+ moving.push(tree.sourcePath);
75
+ return tree;
76
+ });
77
+ }
78
+ }());
79
+ });
80
+ }
81
+ scanned(manifest) {
82
+ if (!isPackageJson(manifest.sourcePath))
83
+ return true;
84
+ this.held.push(manifest);
85
+ return false;
86
+ }
87
+ generate(acc, ctx) {
88
+ const _super = Object.create(null, {
89
+ generate: { get: () => super.generate }
90
+ });
91
+ return __awaiter(this, void 0, void 0, function* () {
92
+ const roots = this.held.map(manifest => packageRoot(manifest.sourcePath));
93
+ const owners = new Set(this.moving.map(path => roots.filter(root => path.startsWith(root)).sort((a, b) => b.length - a.length)[0]));
94
+ const scanner = yield this.java.scanner(acc);
95
+ for (const manifest of this.held) {
96
+ if (owners.has(packageRoot(manifest.sourcePath)))
97
+ yield scanner.visit(manifest, ctx);
98
+ }
99
+ this.held.length = 0;
100
+ return _super.generate.call(this, acc, ctx);
101
+ });
102
+ }
103
+ }
104
+ exports.AddTypesPropTypes = AddTypesPropTypes;
105
+ function isPackageJson(path) {
106
+ return /(^|\/)package\.json$/.test(path) && !path.split('/').includes('node_modules');
107
+ }
108
+ function packageRoot(manifestPath) {
109
+ return manifestPath.slice(0, -'package.json'.length);
110
+ }
111
+ function movingPropTypesTypes() {
112
+ return new class extends javascript_1.JavaScriptVisitor {
113
+ constructor() {
114
+ super(...arguments);
115
+ this.script = false;
116
+ }
117
+ visitJsCompilationUnit(cu, ctx) {
118
+ const _super = Object.create(null, {
119
+ visitJsCompilationUnit: { get: () => super.visitJsCompilationUnit }
120
+ });
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ const names = (0, javascript_1.namesUsedIn)(cu);
123
+ if (!MOVED.some(member => names.has(member)))
124
+ return cu;
125
+ this.qualifier = undefined;
126
+ this.script = !(0, types_1.isModule)(cu);
127
+ for (const member of MOVED) {
128
+ (0, javascript_1.maybeRebind)(this, { from: { module: types_1.react.module, member }, to: { module: propTypes.module, member } });
129
+ }
130
+ (0, types_1.keepMovedTypesTypeOnly)(this, cu, propTypes, MOVED);
131
+ return _super.visitJsCompilationUnit.call(this, cu, ctx);
132
+ });
133
+ }
134
+ visitFieldAccess(fieldAccess, ctx) {
135
+ const _super = Object.create(null, {
136
+ visitFieldAccess: { get: () => super.visitFieldAccess }
137
+ });
138
+ return __awaiter(this, void 0, void 0, function* () {
139
+ var _a;
140
+ if (!this.readsMovedType(this.cursor, fieldAccess))
141
+ return _super.visitFieldAccess.call(this, fieldAccess, ctx);
142
+ if (!this.script)
143
+ return this.retargeted(fieldAccess);
144
+ const parent = (_a = this.cursor.parentTree()) === null || _a === void 0 ? void 0 : _a.value;
145
+ const typeArgumentsFollow = (parent === null || parent === void 0 ? void 0 : parent.kind) === java_1.J.Kind.ParameterizedType && parent.class === fieldAccess;
146
+ return typeArgumentsFollow ? fieldAccess : importTypeOf(fieldAccess, fieldAccess.name.element.simpleName);
147
+ });
148
+ }
149
+ visitParameterizedType(type, ctx) {
150
+ const _super = Object.create(null, {
151
+ visitParameterizedType: { get: () => super.visitParameterizedType }
152
+ });
153
+ return __awaiter(this, void 0, void 0, function* () {
154
+ const pt = yield _super.visitParameterizedType.call(this, type, ctx);
155
+ if (pt.class !== type.class || pt.class.kind !== java_1.J.Kind.FieldAccess ||
156
+ !this.readsMovedType(new rewrite_1.Cursor(pt.class, this.cursor), pt.class))
157
+ return pt;
158
+ const fieldAccess = pt.class;
159
+ return this.script ? importTypeOf(pt, fieldAccess.name.element.simpleName, pt.typeParameters) :
160
+ Object.assign(Object.assign({}, pt), { class: this.retargeted(fieldAccess) });
161
+ });
162
+ }
163
+ readsMovedType(cursor, fieldAccess) {
164
+ const ref = (0, types_1.typeReferenceOf)(cursor, fieldAccess, types_1.react);
165
+ return (ref === null || ref === void 0 ? void 0 : ref.qualifier) !== undefined && !ref.importScope && MOVED.includes(ref.member);
166
+ }
167
+ retargeted(fieldAccess) {
168
+ var _a, _b;
169
+ const cu = (0, javascript_1.compilationUnitOf)(this.cursor);
170
+ (_a = this.qualifier) !== null && _a !== void 0 ? _a : (this.qualifier = (_b = (0, types_1.importsOf)(cu, propTypes).qualifiers.values().next().value) !== null && _b !== void 0 ? _b : ((0, javascript_1.moduleBindings)(this).bindingOf(propTypes.module) === undefined ? (0, javascript_1.maybeBind)(this, {
171
+ module: propTypes.module, member: '*', preferredName: 'PropTypes', typeOnly: true,
172
+ onlyIfReferenced: false, style: javascript_1.ImportStyle.ES6Namespace
173
+ }) : undefined));
174
+ if (this.qualifier) {
175
+ return Object.assign(Object.assign({}, fieldAccess), { target: Object.assign(Object.assign({}, fieldAccess.target), { simpleName: this.qualifier, type: undefined }) });
176
+ }
177
+ const name = fieldAccess.name.element;
178
+ const local = (0, javascript_1.maybeBind)(this, { module: propTypes.module, member: name.simpleName, typeOnly: true, onlyIfReferenced: false });
179
+ return local ? Object.assign(Object.assign({}, name), { prefix: fieldAccess.prefix, markers: fieldAccess.markers, simpleName: local, type: undefined }) : fieldAccess;
180
+ }
181
+ }();
182
+ }
183
+ const parser = new javascript_1.JavaScriptParser();
184
+ function importTypeOf(like, member, typeArguments) {
185
+ return __awaiter(this, void 0, void 0, function* () {
186
+ const parsed = yield parser.parseOnly({ text: `type T = import('${propTypes.module}').${member};`, sourcePath: 'import-type.ts' });
187
+ const importType = parsed.statements[0].element.initializer.element;
188
+ return Object.assign(Object.assign({}, importType), { prefix: like.prefix, markers: like.markers, typeArguments });
189
+ });
190
+ }
191
+ //# sourceMappingURL=deprecated-prop-types-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated-prop-types-types.js","sourceRoot":"","sources":["../../src/react19/deprecated-prop-types-types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA4G;AAC5G,oDAAwD;AACxD,gEAWyC;AACzC,oCAA0H;AAC1H,iEAA2F;AAE3F,MAAM,SAAS,GAAW,EAAC,MAAM,EAAE,YAAY,EAAC,CAAC;AAEjD,MAAM,KAAK,GAAG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,aAAuC;;QACxF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,EAAC,IAAI,EAAE,oBAAoB,SAAS,CAAC,MAAM,MAAM,MAAM,GAAG,EAAE,UAAU,EAAE,gBAAgB,EAAC,CAAuB,CAAC;QACvJ,MAAM,UAAU,GAAI,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,OAA8B,CAAC,WAAW,CAAC,OAAwB,CAAC;QAC7G,uCAAW,UAAU,KAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,aAAa,IAAE;IACtF,CAAC;CAAA"}
@@ -0,0 +1,8 @@
1
+ import { ExecutionContext, Recipe, TreeVisitor } from "@openrewrite/rewrite";
2
+ export declare class DeprecatedReactChild extends Recipe {
3
+ readonly name = "org.openrewrite.react.19.deprecated-react-child";
4
+ readonly displayName = "Replace `ReactChild` with `ReactElement | number | string`";
5
+ readonly description = "Replaces React's `ReactChild` type, removed in `@types/react` 19, with `ReactElement | number | string`, parenthesized where needed.";
6
+ editor(): Promise<TreeVisitor<any, ExecutionContext>>;
7
+ }
8
+ //# sourceMappingURL=deprecated-react-child.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated-react-child.d.ts","sourceRoot":"","sources":["../../src/react19/deprecated-react-child.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAE,MAAM,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAuB3E,qBAAa,oBAAqB,SAAQ,MAAM;IAC5C,QAAQ,CAAC,IAAI,qDAAqD;IAClE,QAAQ,CAAC,WAAW,gEAAgE;IACpF,QAAQ,CAAC,WAAW,0IAA0I;IAExJ,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;CAsC9D"}
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DeprecatedReactChild = void 0;
13
+ const rewrite_1 = require("@openrewrite/rewrite");
14
+ const javascript_1 = require("@openrewrite/rewrite/javascript");
15
+ const types_1 = require("../types");
16
+ class DeprecatedReactChild extends rewrite_1.Recipe {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.name = "org.openrewrite.react.19.deprecated-react-child";
20
+ this.displayName = "Replace `ReactChild` with `ReactElement | number | string`";
21
+ this.description = "Replaces React's `ReactChild` type, removed in `@types/react` 19, with `ReactElement | number | string`, parenthesized where needed.";
22
+ }
23
+ editor() {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ return (0, types_1.onTypeScriptSources)(new class extends javascript_1.JavaScriptVisitor {
26
+ visitJsCompilationUnit(cu, ctx) {
27
+ const _super = Object.create(null, {
28
+ visitJsCompilationUnit: { get: () => super.visitJsCompilationUnit }
29
+ });
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ const visited = yield _super.visitJsCompilationUnit.call(this, cu, ctx);
32
+ if ((0, types_1.importsMember)(cu, types_1.react, 'ReactChild'))
33
+ (0, types_1.dropImport)(this, types_1.react, 'ReactChild');
34
+ return visited;
35
+ });
36
+ }
37
+ visitExportSpecifier(specifier) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ return (0, types_1.markReExport)(this.cursor, specifier, types_1.react, 'ReactChild');
40
+ });
41
+ }
42
+ visitIdentifier(identifier, ctx) {
43
+ const _super = Object.create(null, {
44
+ visitIdentifier: { get: () => super.visitIdentifier }
45
+ });
46
+ return __awaiter(this, void 0, void 0, function* () {
47
+ return this.replace(yield _super.visitIdentifier.call(this, identifier, ctx));
48
+ });
49
+ }
50
+ visitFieldAccess(fieldAccess, ctx) {
51
+ const _super = Object.create(null, {
52
+ visitFieldAccess: { get: () => super.visitFieldAccess }
53
+ });
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ return (0, types_1.typeReferenceOf)(this.cursor, fieldAccess, types_1.react) ? this.replace(fieldAccess) : _super.visitFieldAccess.call(this, fieldAccess, ctx);
56
+ });
57
+ }
58
+ visitImportType(importType, ctx) {
59
+ const _super = Object.create(null, {
60
+ visitImportType: { get: () => super.visitImportType }
61
+ });
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ const visited = yield _super.visitImportType.call(this, importType, ctx);
64
+ const ref = (0, types_1.importTypeReferenceOf)(visited, types_1.react);
65
+ if ((ref === null || ref === void 0 ? void 0 : ref.member) !== 'ReactChild' || !(0, types_1.inTypePosition)(this.cursor))
66
+ return visited;
67
+ return (0, types_1.replaceType)(this, this.cursor, ref, visited, `${(0, types_1.typeName)(this, this.cursor, ref, 'ReactElement')} | number | string`);
68
+ });
69
+ }
70
+ visitUnion(union, ctx) {
71
+ const _super = Object.create(null, {
72
+ visitUnion: { get: () => super.visitUnion }
73
+ });
74
+ return __awaiter(this, void 0, void 0, function* () {
75
+ return (0, types_1.flattenUnion)(yield _super.visitUnion.call(this, union, ctx));
76
+ });
77
+ }
78
+ replace(name) {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ const ref = (0, types_1.typeReferenceOf)(this.cursor, name, types_1.react);
81
+ if ((ref === null || ref === void 0 ? void 0 : ref.member) !== 'ReactChild' || !(0, types_1.inTypePosition)(this.cursor))
82
+ return name;
83
+ return (0, types_1.replaceType)(this, this.cursor, ref, name, `${(0, types_1.typeName)(this, this.cursor, ref, 'ReactElement')} | number | string`);
84
+ });
85
+ }
86
+ }());
87
+ });
88
+ }
89
+ }
90
+ exports.DeprecatedReactChild = DeprecatedReactChild;
91
+ //# sourceMappingURL=deprecated-react-child.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated-react-child.js","sourceRoot":"","sources":["../../src/react19/deprecated-react-child.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA2E;AAE3E,gEAAsE;AACtE,oCAYkB;AAQlB,MAAa,oBAAqB,SAAQ,gBAAM;IAAhD;;QACa,SAAI,GAAG,iDAAiD,CAAC;QACzD,gBAAW,GAAG,4DAA4D,CAAC;QAC3E,gBAAW,GAAG,sIAAsI,CAAC;IAwClK,CAAC;IAtCS,MAAM;;YACR,OAAO,IAAA,2BAAmB,EAAC,IAAI,KAAM,SAAQ,8BAAmC;gBAC7D,sBAAsB,CAAC,EAAsB,EAAE,GAAqB;;;;;wBAC/E,MAAM,OAAO,GAAG,MAAM,OAAM,sBAAsB,YAAC,EAAE,EAAE,GAAG,CAAC,CAAC;wBAC5D,IAAI,IAAA,qBAAa,EAAC,EAAE,EAAE,aAAK,EAAE,YAAY,CAAC;4BAAE,IAAA,kBAAU,EAAC,IAAI,EAAE,aAAK,EAAE,YAAY,CAAC,CAAC;wBAClF,OAAO,OAAO,CAAC;oBACnB,CAAC;iBAAA;gBAEc,oBAAoB,CAAC,SAA6B;;wBAC7D,OAAO,IAAA,oBAAY,EAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,aAAK,EAAE,YAAY,CAAC,CAAC;oBACrE,CAAC;iBAAA;gBAEc,eAAe,CAAC,UAAwB,EAAE,GAAqB;;;;;wBAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,OAAM,eAAe,YAAC,UAAU,EAAE,GAAG,CAAiB,CAAC,CAAC;oBACtF,CAAC;iBAAA;gBAEc,gBAAgB,CAAC,WAA0B,EAAE,GAAqB;;;;;wBAC7E,OAAO,IAAA,uBAAe,EAAC,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,aAAK,CAAC,CAAC,CAAC,C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AI,EAAE,GAAG,IAAA,gBAAQ,EAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,cAAc,CAAC,oBAAoB,CAAC,CAAC;oBAC9H,CAAC;iBAAA;aACJ,EAAE,CAAC,CAAC;QACT,CAAC;KAAA;CACJ;AA3CD,oDA2CC"}
@@ -0,0 +1,8 @@
1
+ import { ExecutionContext, Recipe, TreeVisitor } from "@openrewrite/rewrite";
2
+ export declare class DeprecatedReactFragment extends Recipe {
3
+ readonly name = "org.openrewrite.react.19.deprecated-react-fragment";
4
+ readonly displayName = "Replace `ReactFragment` with `Iterable<ReactNode>`";
5
+ readonly description = "Replaces React's `ReactFragment` type, removed in `@types/react` 19, with `Iterable<ReactNode>`, or with `ReactNode` where the installed `@types/react` 16 or 17 still declares it as a `{}` union that takes any element.";
6
+ editor(): Promise<TreeVisitor<any, ExecutionContext>>;
7
+ }
8
+ //# sourceMappingURL=deprecated-react-fragment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated-react-fragment.d.ts","sourceRoot":"","sources":["../../src/react19/deprecated-react-fragment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAE,MAAM,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAwB3E,qBAAa,uBAAwB,SAAQ,MAAM;IAC/C,QAAQ,CAAC,IAAI,wDAAwD;IACrE,QAAQ,CAAC,WAAW,wDAAwD;IAC5E,QAAQ,CAAC,WAAW,gOAAgO;IAE9O,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;CAuC9D"}
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DeprecatedReactFragment = void 0;
13
+ const rewrite_1 = require("@openrewrite/rewrite");
14
+ const java_1 = require("@openrewrite/rewrite/java");
15
+ const javascript_1 = require("@openrewrite/rewrite/javascript");
16
+ const types_1 = require("../types");
17
+ class DeprecatedReactFragment extends rewrite_1.Recipe {
18
+ constructor() {
19
+ super(...arguments);
20
+ this.name = "org.openrewrite.react.19.deprecated-react-fragment";
21
+ this.displayName = "Replace `ReactFragment` with `Iterable<ReactNode>`";
22
+ this.description = "Replaces React's `ReactFragment` type, removed in `@types/react` 19, with `Iterable<ReactNode>`, or with `ReactNode` where the installed `@types/react` 16 or 17 still declares it as a `{}` union that takes any element.";
23
+ }
24
+ editor() {
25
+ return __awaiter(this, void 0, void 0, function* () {
26
+ return (0, types_1.onTypeScriptSources)(new class extends javascript_1.JavaScriptVisitor {
27
+ visitJsCompilationUnit(cu, ctx) {
28
+ const _super = Object.create(null, {
29
+ visitJsCompilationUnit: { get: () => super.visitJsCompilationUnit }
30
+ });
31
+ return __awaiter(this, void 0, void 0, function* () {
32
+ const visited = yield _super.visitJsCompilationUnit.call(this, cu, ctx);
33
+ if ((0, types_1.importsMember)(cu, types_1.react, 'ReactFragment'))
34
+ (0, types_1.dropImport)(this, types_1.react, 'ReactFragment');
35
+ return visited;
36
+ });
37
+ }
38
+ visitExportSpecifier(specifier) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ return (0, types_1.markReExport)(this.cursor, specifier, types_1.react, 'ReactFragment');
41
+ });
42
+ }
43
+ visitIdentifier(identifier, ctx) {
44
+ const _super = Object.create(null, {
45
+ visitIdentifier: { get: () => super.visitIdentifier }
46
+ });
47
+ return __awaiter(this, void 0, void 0, function* () {
48
+ return this.replace(yield _super.visitIdentifier.call(this, identifier, ctx));
49
+ });
50
+ }
51
+ visitFieldAccess(fieldAccess, ctx) {
52
+ const _super = Object.create(null, {
53
+ visitFieldAccess: { get: () => super.visitFieldAccess }
54
+ });
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ return (0, types_1.typeReferenceOf)(this.cursor, fieldAccess, types_1.react) ? this.replace(fieldAccess) : _super.visitFieldAccess.call(this, fieldAccess, ctx);
57
+ });
58
+ }
59
+ visitImportType(importType, ctx) {
60
+ const _super = Object.create(null, {
61
+ visitImportType: { get: () => super.visitImportType }
62
+ });
63
+ return __awaiter(this, void 0, void 0, function* () {
64
+ const visited = yield _super.visitImportType.call(this, importType, ctx);
65
+ const ref = (0, types_1.importTypeReferenceOf)(visited, types_1.react);
66
+ if ((ref === null || ref === void 0 ? void 0 : ref.member) !== 'ReactFragment' || !(0, types_1.inTypePosition)(this.cursor))
67
+ return visited;
68
+ return (0, types_1.replaceType)(this, this.cursor, ref, visited, this.fragment(ref, visited.qualifier.element));
69
+ });
70
+ }
71
+ fragment(ref, name) {
72
+ const node = (0, types_1.typeName)(this, this.cursor, ref, 'ReactNode');
73
+ return takesAnyObject(name) ? node : `${(0, types_1.globalTypeName)(this.cursor, 'Iterable')}<${node}>`;
74
+ }
75
+ replace(name) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ const ref = (0, types_1.typeReferenceOf)(this.cursor, name, types_1.react);
78
+ if ((ref === null || ref === void 0 ? void 0 : ref.member) !== 'ReactFragment' || !(0, types_1.inTypePosition)(this.cursor))
79
+ return name;
80
+ return (0, types_1.replaceType)(this, this.cursor, ref, name, this.fragment(ref, name));
81
+ });
82
+ }
83
+ }());
84
+ });
85
+ }
86
+ }
87
+ exports.DeprecatedReactFragment = DeprecatedReactFragment;
88
+ function takesAnyObject(name) {
89
+ const type = name.kind === java_1.J.Kind.FieldAccess ? name.type : name.type;
90
+ return java_1.Type.isUnion(type) && type.bounds.some(bound => java_1.Type.isClass(bound) && bound.fullyQualifiedName === '{}');
91
+ }
92
+ //# sourceMappingURL=deprecated-react-fragment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated-react-fragment.js","sourceRoot":"","sources":["../../src/react19/deprecated-react-fragment.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA2E;AAC3E,oDAAkD;AAClD,gEAAsE;AACtE,oCAakB;AAQlB,MAAa,uBAAwB,SAAQ,gBAAM;IAAnD;;QACa,SAAI,GAAG,oDAAoD,CAAC;QAC5D,gBAAW,GAAG,oDAAoD,CAAC;QACnE,gBAAW,GAAG,4NAA4N,CAAC;IAyCxP,CAAC;IAvCS,MAAM;;YACR,OAAO,IAAA,2BAAmB,EAAC,IAAI,KAAM,SAAQ,8BAAmC;gBAC7D,sBAAsB,CAAC,EAAsB,EAAE,GAAqB;;;;;wBAC/E,MAAM,OAAO,GAAG,MAAM,OAAM,sBAAsB,YAAC,EAAE,EAAE,GAAG,CAAC,CAAC;wBAC5D,IAAI,IAAA,qBAAa,EAAC,EAAE,EAAE,aAAK,EAAE,eAAe,CAAC;4BAAE,IAAA,kBAAU,EAAC,IAAI,EAAE,aAAK,EAAE,eAAe,CAAC,CAAC;wBACxF,OAAO,OAAO,CAAC;oBACnB,CAAC;iBAAA;gBAEc,oBAAoB,CAAC,SAA6B;;wBAC7D,OAAO,IAAA,oBAAY,EAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,aAAK,EAAE,eAAe,CAAC,CAAC;oBACxE,CAAC;iBAAA;gBAEc,eAAe,CAAC,UAAwB,EAAE,GAAqB;;;;;wBAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,OAAM,eAAe,YAAC,UAAU,EAAE,GAAG,CAAiB,CAAC,CAAC;oBACtF,CAAC;iBAAA;gBAEc,gBAAgB,CAAC,WAA0B,EAAE,GAAqB;;;;;wBAC7E,OAAO,IAAA,uBAAe,EAAC,IAAI,CAAC,MAAM,EAAE,WAAW,EA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,MAAM,MAAK,eAAe,IAAI,CAAC,IAAA,sBAAc,EAAC,IAAI,CAAC,MAAM,CAAC;4BAAE,OAAO,IAAI,CAAC;wBACjF,OAAO,IAAA,mBAAW,EAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;oBAC/E,CAAC;iBAAA;aACJ,EAAE,CAAC,CAAC;QACT,CAAC;KAAA;CACJ;AA5CD,0DA4CC;AAED,SAAS,cAAc,CAAC,IAAkC;IACtD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,KAAK,QAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAE,IAAsB,CAAC,IAAI,CAAC,CAAC,CAAE,IAAqB,CAAC,IAAI,CAAC;IAC3G,OAAO,WAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,WAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,kBAAkB,KAAK,IAAI,CAAC,CAAC;AACrH,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ExecutionContext, Recipe, TreeVisitor } from "@openrewrite/rewrite";
2
+ export declare class DeprecatedReactNodeArray extends Recipe {
3
+ readonly name = "org.openrewrite.react.19.deprecated-react-node-array";
4
+ readonly displayName = "Replace `ReactNodeArray` with `ReadonlyArray<ReactNode>`";
5
+ readonly description = "Replaces React's `ReactNodeArray` type, removed in `@types/react` 19, with `ReadonlyArray<ReactNode>`, or with `Array<ReactNode>` where the installed `@types/react` still declares it as a mutable `Array`.";
6
+ editor(): Promise<TreeVisitor<any, ExecutionContext>>;
7
+ }
8
+ //# sourceMappingURL=deprecated-react-node-array.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated-react-node-array.d.ts","sourceRoot":"","sources":["../../src/react19/deprecated-react-node-array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAE,MAAM,EAAE,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAwB3E,qBAAa,wBAAyB,SAAQ,MAAM;IAChD,QAAQ,CAAC,IAAI,0DAA0D;IACvE,QAAQ,CAAC,WAAW,8DAA8D;IAClF,QAAQ,CAAC,WAAW,kNAAkN;IAEhO,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;CAuC9D"}