@openrewrite/recipes-react 0.4.0-20260728-173524 → 0.4.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.
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-to-react-16.d.ts","sourceRoot":"","sources":["../../src/react16/upgrade-to-react-16.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAqB5C,qBAAa,gBAAiB,SAAQ,MAAM;IACxC,QAAQ,CAAC,IAAI,uDAAuD;IACpE,QAAQ,CAAC,WAAW,yBAAyB;IAC7C,QAAQ,CAAC,WAAW,4LAA4L;IAE1M,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAUxC"}
1
+ {"version":3,"file":"upgrade-to-react-16.d.ts","sourceRoot":"","sources":["../../src/react16/upgrade-to-react-16.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAsB5C,qBAAa,gBAAiB,SAAQ,MAAM;IACxC,QAAQ,CAAC,IAAI,uDAAuD;IACpE,QAAQ,CAAC,WAAW,yBAAyB;IAC7C,QAAQ,CAAC,WAAW,4LAA4L;IAE1M,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAcxC"}
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UpgradeToReact16 = void 0;
13
13
  const rewrite_1 = require("@openrewrite/rewrite");
14
+ const javascript_1 = require("@openrewrite/rewrite/javascript");
14
15
  const error_boundaries_1 = require("./error-boundaries");
15
16
  const find_dom_node_1 = require("./find-dom-node");
16
17
  const react_prop_types_1 = require("./react-prop-types");
@@ -33,6 +34,10 @@ class UpgradeToReact16 extends rewrite_1.Recipe {
33
34
  new find_dom_node_1.FindDomNode(),
34
35
  new error_boundaries_1.ErrorBoundaries(),
35
36
  new replace_create_factory_1.ReplaceCreateFactory(),
37
+ new javascript_1.UpgradeDependencyVersion({ packageName: "react", newVersion: "16.x" }),
38
+ new javascript_1.UpgradeDependencyVersion({ packageName: "react-dom", newVersion: "16.x" }),
39
+ new javascript_1.UpgradeDependencyVersion({ packageName: "@types/react", newVersion: "16.x" }),
40
+ new javascript_1.UpgradeDependencyVersion({ packageName: "@types/react-dom", newVersion: "16.x" }),
36
41
  ];
37
42
  });
38
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-to-react-16.js","sourceRoot":"","sources":["../../src/react16/upgrade-to-react-16.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA4C;AAC5C,yDAAmD;AACnD,mDAA4C;AAC5C,yDAAkD;AAClD,+DAAwD;AACxD,6DAAqD;AACrD,qEAA8D;AAe9D,MAAa,gBAAiB,SAAQ,gBAAM;IAA5C;;QACa,SAAI,GAAG,mDAAmD,CAAC;QAC3D,gBAAW,GAAG,qBAAqB,CAAC;QACpC,gBAAW,GAAG,wLAAwL,CAAC;IAYpN,CAAC;IAVS,UAAU;;YACZ,OAAO;gBACH,IAAI,iCAAc,EAAE;gBACpB,IAAI,uCAAiB,EAAE;gBACvB,IAAI,oCAAe,EAAE;gBACrB,IAAI,2BAAW,EAAE;gBACjB,IAAI,kCAAe,EAAE;gBACrB,IAAI,6CAAoB,EAAE;aAC7B,CAAC;QACN,CAAC;KAAA;CACJ;AAfD,4CAeC"}
1
+ {"version":3,"file":"upgrade-to-react-16.js","sourceRoot":"","sources":["../../src/react16/upgrade-to-react-16.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA4C;AAC5C,gEAAyE;AACzE,yDAAmD;AACnD,mDAA4C;AAC5C,yDAAkD;AAClD,+DAAwD;AACxD,6DAAqD;AACrD,qEAA8D;AAe9D,MAAa,gBAAiB,SAAQ,gBAAM;IAA5C;;QACa,SAAI,GAAG,mDAAmD,CAAC;QAC3D,gBAAW,GAAG,qBAAqB,CAAC;QACpC,gBAAW,GAAG,wLAAwL,CAAC;IAgBpN,CAAC;IAdS,UAAU;;YACZ,OAAO;gBACH,IAAI,iCAAc,EAAE;gBACpB,IAAI,uCAAiB,EAAE;gBACvB,IAAI,oCAAe,EAAE;gBACrB,IAAI,2BAAW,EAAE;gBACjB,IAAI,kCAAe,EAAE;gBACrB,IAAI,6CAAoB,EAAE;gBAC1B,IAAI,qCAAwB,CAAC,EAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;gBACxE,IAAI,qCAAwB,CAAC,EAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;gBAC5E,IAAI,qCAAwB,CAAC,EAAC,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;gBAC/E,IAAI,qCAAwB,CAAC,EAAC,WAAW,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;aACtF,CAAC;QACN,CAAC;KAAA;CACJ;AAnBD,4CAmBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-to-react-17.d.ts","sourceRoot":"","sources":["../../src/react17/upgrade-to-react-17.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAgB5C,qBAAa,gBAAiB,SAAQ,MAAM;IACxC,QAAQ,CAAC,IAAI,uDAAuD;IACpE,QAAQ,CAAC,WAAW,yBAAyB;IAC7C,QAAQ,CAAC,WAAW,wKAAwK;IAEtL,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAQxC"}
1
+ {"version":3,"file":"upgrade-to-react-17.d.ts","sourceRoot":"","sources":["../../src/react17/upgrade-to-react-17.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAiB5C,qBAAa,gBAAiB,SAAQ,MAAM;IACxC,QAAQ,CAAC,IAAI,uDAAuD;IACpE,QAAQ,CAAC,WAAW,yBAAyB;IAC7C,QAAQ,CAAC,WAAW,wKAAwK;IAEtL,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAYxC"}
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UpgradeToReact17 = void 0;
13
13
  const rewrite_1 = require("@openrewrite/rewrite");
14
+ const javascript_1 = require("@openrewrite/rewrite/javascript");
14
15
  const upgrade_to_react_16_1 = require("../react16/upgrade-to-react-16");
15
16
  const rename_unsafe_lifecycles_1 = require("./rename-unsafe-lifecycles");
16
17
  const update_react_imports_1 = require("./update-react-imports");
@@ -29,6 +30,10 @@ class UpgradeToReact17 extends rewrite_1.Recipe {
29
30
  new rename_unsafe_lifecycles_1.RenameUnsafeLifecycles(),
30
31
  new update_react_imports_1.UpdateReactImports(),
31
32
  new remove_event_persist_1.RemoveEventPersist(),
33
+ new javascript_1.UpgradeDependencyVersion({ packageName: "react", newVersion: "17.x" }),
34
+ new javascript_1.UpgradeDependencyVersion({ packageName: "react-dom", newVersion: "17.x" }),
35
+ new javascript_1.UpgradeDependencyVersion({ packageName: "@types/react", newVersion: "17.x" }),
36
+ new javascript_1.UpgradeDependencyVersion({ packageName: "@types/react-dom", newVersion: "17.x" }),
32
37
  ];
33
38
  });
34
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-to-react-17.js","sourceRoot":"","sources":["../../src/react17/upgrade-to-react-17.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA4C;AAC5C,wEAAgE;AAChE,yEAAkE;AAClE,iEAA0D;AAC1D,iEAA0D;AAY1D,MAAa,gBAAiB,SAAQ,gBAAM;IAA5C;;QACa,SAAI,GAAG,mDAAmD,CAAC;QAC3D,gBAAW,GAAG,qBAAqB,CAAC;QACpC,gBAAW,GAAG,oKAAoK,CAAC;IAUhM,CAAC;IARS,UAAU;;YACZ,OAAO;gBACH,IAAI,sCAAgB,EAAE;gBACtB,IAAI,iDAAsB,EAAE;gBAC5B,IAAI,yCAAkB,EAAE;gBACxB,IAAI,yCAAkB,EAAE;aAC3B,CAAC;QACN,CAAC;KAAA;CACJ;AAbD,4CAaC"}
1
+ {"version":3,"file":"upgrade-to-react-17.js","sourceRoot":"","sources":["../../src/react17/upgrade-to-react-17.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA4C;AAC5C,gEAAyE;AACzE,wEAAgE;AAChE,yEAAkE;AAClE,iEAA0D;AAC1D,iEAA0D;AAY1D,MAAa,gBAAiB,SAAQ,gBAAM;IAA5C;;QACa,SAAI,GAAG,mDAAmD,CAAC;QAC3D,gBAAW,GAAG,qBAAqB,CAAC;QACpC,gBAAW,GAAG,oKAAoK,CAAC;IAchM,CAAC;IAZS,UAAU;;YACZ,OAAO;gBACH,IAAI,sCAAgB,EAAE;gBACtB,IAAI,iDAAsB,EAAE;gBAC5B,IAAI,yCAAkB,EAAE;gBACxB,IAAI,yCAAkB,EAAE;gBACxB,IAAI,qCAAwB,CAAC,EAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;gBACxE,IAAI,qCAAwB,CAAC,EAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;gBAC5E,IAAI,qCAAwB,CAAC,EAAC,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;gBAC/E,IAAI,qCAAwB,CAAC,EAAC,WAAW,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;aACtF,CAAC;QACN,CAAC;KAAA;CACJ;AAjBD,4CAiBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-to-react-18.d.ts","sourceRoot":"","sources":["../../src/react18/upgrade-to-react-18.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAkB5C,qBAAa,gBAAiB,SAAQ,MAAM;IACxC,QAAQ,CAAC,IAAI,uDAAuD;IACpE,QAAQ,CAAC,WAAW,yBAAyB;IAC7C,QAAQ,CAAC,WAAW,yOAAyO;IAEvP,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CASxC"}
1
+ {"version":3,"file":"upgrade-to-react-18.d.ts","sourceRoot":"","sources":["../../src/react18/upgrade-to-react-18.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAmB5C,qBAAa,gBAAiB,SAAQ,MAAM;IACxC,QAAQ,CAAC,IAAI,uDAAuD;IACpE,QAAQ,CAAC,WAAW,yBAAyB;IAC7C,QAAQ,CAAC,WAAW,yOAAyO;IAEvP,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAaxC"}
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UpgradeToReact18 = void 0;
13
13
  const rewrite_1 = require("@openrewrite/rewrite");
14
+ const javascript_1 = require("@openrewrite/rewrite/javascript");
14
15
  const upgrade_to_react_17_1 = require("../react17/upgrade-to-react-17");
15
16
  const replace_reactdom_render_1 = require("./replace-reactdom-render");
16
17
  const remove_unstable_batched_updates_1 = require("./remove-unstable-batched-updates");
@@ -31,6 +32,10 @@ class UpgradeToReact18 extends rewrite_1.Recipe {
31
32
  new remove_unstable_batched_updates_1.RemoveUnstableBatchedUpdates(),
32
33
  new replace_unmount_component_at_node_1.ReplaceUnmountComponentAtNode(),
33
34
  new replace_render_callback_1.ReplaceRenderCallback(),
35
+ new javascript_1.UpgradeDependencyVersion({ packageName: "react", newVersion: "18.x" }),
36
+ new javascript_1.UpgradeDependencyVersion({ packageName: "react-dom", newVersion: "18.x" }),
37
+ new javascript_1.UpgradeDependencyVersion({ packageName: "@types/react", newVersion: "18.x" }),
38
+ new javascript_1.UpgradeDependencyVersion({ packageName: "@types/react-dom", newVersion: "18.x" }),
34
39
  ];
35
40
  });
36
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-to-react-18.js","sourceRoot":"","sources":["../../src/react18/upgrade-to-react-18.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA4C;AAC5C,wEAAgE;AAChE,uEAAgE;AAChE,uFAA+E;AAC/E,2FAAkF;AAClF,uEAAgE;AAahE,MAAa,gBAAiB,SAAQ,gBAAM;IAA5C;;QACa,SAAI,GAAG,mDAAmD,CAAC;QAC3D,gBAAW,GAAG,qBAAqB,CAAC;QACpC,gBAAW,GAAG,qOAAqO,CAAC;IAWjQ,CAAC;IATS,UAAU;;YACZ,OAAO;gBACH,IAAI,sCAAgB,EAAE;gBACtB,IAAI,+CAAqB,EAAE;gBAC3B,IAAI,8DAA4B,EAAE;gBAClC,IAAI,iEAA6B,EAAE;gBACnC,IAAI,+CAAqB,EAAE;aAC9B,CAAC;QACN,CAAC;KAAA;CACJ;AAdD,4CAcC"}
1
+ {"version":3,"file":"upgrade-to-react-18.js","sourceRoot":"","sources":["../../src/react18/upgrade-to-react-18.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA4C;AAC5C,gEAAyE;AACzE,wEAAgE;AAChE,uEAAgE;AAChE,uFAA+E;AAC/E,2FAAkF;AAClF,uEAAgE;AAahE,MAAa,gBAAiB,SAAQ,gBAAM;IAA5C;;QACa,SAAI,GAAG,mDAAmD,CAAC;QAC3D,gBAAW,GAAG,qBAAqB,CAAC;QACpC,gBAAW,GAAG,qOAAqO,CAAC;IAejQ,CAAC;IAbS,UAAU;;YACZ,OAAO;gBACH,IAAI,sCAAgB,EAAE;gBACtB,IAAI,+CAAqB,EAAE;gBAC3B,IAAI,8DAA4B,EAAE;gBAClC,IAAI,iEAA6B,EAAE;gBACnC,IAAI,+CAAqB,EAAE;gBAC3B,IAAI,qCAAwB,CAAC,EAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;gBACxE,IAAI,qCAAwB,CAAC,EAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;gBAC5E,IAAI,qCAAwB,CAAC,EAAC,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;gBAC/E,IAAI,qCAAwB,CAAC,EAAC,WAAW,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;aACtF,CAAC;QACN,CAAC;KAAA;CACJ;AAlBD,4CAkBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-to-react-19.d.ts","sourceRoot":"","sources":["../../src/react19/upgrade-to-react-19.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAyC5C,qBAAa,gBAAiB,SAAQ,MAAM;IACxC,QAAQ,CAAC,IAAI,uDAAuD;IACpE,QAAQ,CAAC,WAAW,yBAAyB;IAC7C,QAAQ,CAAC,WAAW,oMAAoM;IAElN,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAmBxC"}
1
+ {"version":3,"file":"upgrade-to-react-19.d.ts","sourceRoot":"","sources":["../../src/react19/upgrade-to-react-19.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AA0C5C,qBAAa,gBAAiB,SAAQ,MAAM;IACxC,QAAQ,CAAC,IAAI,uDAAuD;IACpE,QAAQ,CAAC,WAAW,yBAAyB;IAC7C,QAAQ,CAAC,WAAW,oMAAoM;IAElN,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAuBxC"}
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UpgradeToReact19 = void 0;
13
13
  const rewrite_1 = require("@openrewrite/rewrite");
14
+ const javascript_1 = require("@openrewrite/rewrite/javascript");
14
15
  const upgrade_to_react_18_1 = require("../react18/upgrade-to-react-18");
15
16
  const remove_forward_ref_1 = require("./remove-forward-ref");
16
17
  const remove_react_fc_1 = require("./remove-react-fc");
@@ -51,6 +52,10 @@ class UpgradeToReact19 extends rewrite_1.Recipe {
51
52
  new no_implicit_ref_callback_return_1.NoImplicitRefCallbackReturn(),
52
53
  new deprecated_react_types_1.DeprecatedReactTypes(),
53
54
  new replace_react_shallow_renderer_1.ReplaceReactShallowRenderer(),
55
+ new javascript_1.UpgradeDependencyVersion({ packageName: "react", newVersion: "19.x" }),
56
+ new javascript_1.UpgradeDependencyVersion({ packageName: "react-dom", newVersion: "19.x" }),
57
+ new javascript_1.UpgradeDependencyVersion({ packageName: "@types/react", newVersion: "19.x" }),
58
+ new javascript_1.UpgradeDependencyVersion({ packageName: "@types/react-dom", newVersion: "19.x" }),
54
59
  ];
55
60
  });
56
61
  }
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-to-react-19.js","sourceRoot":"","sources":["../../src/react19/upgrade-to-react-19.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA4C;AAC5C,wEAAgE;AAChE,6DAAsD;AACtD,uDAAgD;AAChD,6DAAsD;AACtD,uEAAgE;AAChE,yDAAkD;AAClD,qEAA6D;AAC7D,6DAAsD;AACtD,mEAA4D;AAC5D,yEAAkE;AAClE,yEAAiE;AACjE,2DAAoD;AACpD,uFAA8E;AAC9E,qEAA8D;AAC9D,qFAA6E;AA0B7E,MAAa,gBAAiB,SAAQ,gBAAM;IAA5C;;QACa,SAAI,GAAG,mDAAmD,CAAC;QAC3D,gBAAW,GAAG,qBAAqB,CAAC;QACpC,gBAAW,GAAG,gMAAgM,CAAC;IAqB5N,CAAC;IAnBS,UAAU;;YACZ,OAAO;gBACH,IAAI,sCAAgB,EAAE;gBACtB,IAAI,qCAAgB,EAAE;gBACtB,IAAI,+BAAa,EAAE;gBACnB,IAAI,qCAAgB,EAAE;gBACtB,IAAI,+CAAqB,EAAE;gBAC3B,IAAI,iCAAc,EAAE;gBACpB,IAAI,4CAAmB,EAAE;gBACzB,IAAI,qCAAgB,EAAE;gBACtB,IAAI,2CAAmB,EAAE;gBACzB,IAAI,iDAAsB,EAAE;gBAC5B,IAAI,gDAAqB,EAAE;gBAC3B,IAAI,mCAAe,EAAE;gBACrB,IAAI,6DAA2B,EAAE;gBACjC,IAAI,6CAAoB,EAAE;gBAC1B,IAAI,4DAA2B,EAAE;aACpC,CAAC;QACN,CAAC;KAAA;CACJ;AAxBD,4CAwBC"}
1
+ {"version":3,"file":"upgrade-to-react-19.js","sourceRoot":"","sources":["../../src/react19/upgrade-to-react-19.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA4C;AAC5C,gEAAyE;AACzE,wEAAgE;AAChE,6DAAsD;AACtD,uDAAgD;AAChD,6DAAsD;AACtD,uEAAgE;AAChE,yDAAkD;AAClD,qEAA6D;AAC7D,6DAAsD;AACtD,mEAA4D;AAC5D,yEAAkE;AAClE,yEAAiE;AACjE,2DAAoD;AACpD,uFAA8E;AAC9E,qEAA8D;AAC9D,qFAA6E;AA0B7E,MAAa,gBAAiB,SAAQ,gBAAM;IAA5C;;QACa,SAAI,GAAG,mDAAmD,CAAC;QAC3D,gBAAW,GAAG,qBAAqB,CAAC;QACpC,gBAAW,GAAG,gMAAgM,CAAC;IAyB5N,CAAC;IAvBS,UAAU;;YACZ,OAAO;gBACH,IAAI,sCAAgB,EAAE;gBACtB,IAAI,qCAAgB,EAAE;gBACtB,IAAI,+BAAa,EAAE;gBACnB,IAAI,qCAAgB,EAAE;gBACtB,IAAI,+CAAqB,EAAE;gBAC3B,IAAI,iCAAc,EAAE;gBACpB,IAAI,4CAAmB,EAAE;gBACzB,IAAI,qCAAgB,EAAE;gBACtB,IAAI,2CAAmB,EAAE;gBACzB,IAAI,iDAAsB,EAAE;gBAC5B,IAAI,gDAAqB,EAAE;gBAC3B,IAAI,mCAAe,EAAE;gBACrB,IAAI,6DAA2B,EAAE;gBACjC,IAAI,6CAAoB,EAAE;gBAC1B,IAAI,4DAA2B,EAAE;gBACjC,IAAI,qCAAwB,CAAC,EAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;gBACxE,IAAI,qCAAwB,CAAC,EAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;gBAC5E,IAAI,qCAAwB,CAAC,EAAC,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;gBAC/E,IAAI,qCAAwB,CAAC,EAAC,WAAW,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,EAAC,CAAC;aACtF,CAAC;QACN,CAAC;KAAA;CACJ;AA5BD,4CA4BC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrewrite/recipes-react",
3
- "version": "0.4.0-20260728-173524",
3
+ "version": "0.4.0",
4
4
  "license": "Moderne Source Available License",
5
5
  "description": "OpenRewrite recipes for React.",
6
6
  "homepage": "https://github.com/openrewrite/rewrite",
@@ -1,4 +1,5 @@
1
1
  import {Recipe} from "@openrewrite/rewrite";
2
+ import {UpgradeDependencyVersion} from "@openrewrite/rewrite/javascript";
2
3
  import {ErrorBoundaries} from "./error-boundaries";
3
4
  import {FindDomNode} from "./find-dom-node";
4
5
  import {ReactPropTypes} from "./react-prop-types";
@@ -32,6 +33,10 @@ export class UpgradeToReact16 extends Recipe {
32
33
  new FindDomNode(),
33
34
  new ErrorBoundaries(),
34
35
  new ReplaceCreateFactory(),
36
+ new UpgradeDependencyVersion({packageName: "react", newVersion: "16.x"}),
37
+ new UpgradeDependencyVersion({packageName: "react-dom", newVersion: "16.x"}),
38
+ new UpgradeDependencyVersion({packageName: "@types/react", newVersion: "16.x"}),
39
+ new UpgradeDependencyVersion({packageName: "@types/react-dom", newVersion: "16.x"}),
35
40
  ];
36
41
  }
37
42
  }
@@ -1,4 +1,5 @@
1
1
  import {Recipe} from "@openrewrite/rewrite";
2
+ import {UpgradeDependencyVersion} from "@openrewrite/rewrite/javascript";
2
3
  import {UpgradeToReact16} from "../react16/upgrade-to-react-16";
3
4
  import {RenameUnsafeLifecycles} from "./rename-unsafe-lifecycles";
4
5
  import {UpdateReactImports} from "./update-react-imports";
@@ -25,6 +26,10 @@ export class UpgradeToReact17 extends Recipe {
25
26
  new RenameUnsafeLifecycles(),
26
27
  new UpdateReactImports(),
27
28
  new RemoveEventPersist(),
29
+ new UpgradeDependencyVersion({packageName: "react", newVersion: "17.x"}),
30
+ new UpgradeDependencyVersion({packageName: "react-dom", newVersion: "17.x"}),
31
+ new UpgradeDependencyVersion({packageName: "@types/react", newVersion: "17.x"}),
32
+ new UpgradeDependencyVersion({packageName: "@types/react-dom", newVersion: "17.x"}),
28
33
  ];
29
34
  }
30
35
  }
@@ -1,4 +1,5 @@
1
1
  import {Recipe} from "@openrewrite/rewrite";
2
+ import {UpgradeDependencyVersion} from "@openrewrite/rewrite/javascript";
2
3
  import {UpgradeToReact17} from "../react17/upgrade-to-react-17";
3
4
  import {ReplaceReactDomRender} from "./replace-reactdom-render";
4
5
  import {RemoveUnstableBatchedUpdates} from "./remove-unstable-batched-updates";
@@ -28,6 +29,10 @@ export class UpgradeToReact18 extends Recipe {
28
29
  new RemoveUnstableBatchedUpdates(),
29
30
  new ReplaceUnmountComponentAtNode(),
30
31
  new ReplaceRenderCallback(),
32
+ new UpgradeDependencyVersion({packageName: "react", newVersion: "18.x"}),
33
+ new UpgradeDependencyVersion({packageName: "react-dom", newVersion: "18.x"}),
34
+ new UpgradeDependencyVersion({packageName: "@types/react", newVersion: "18.x"}),
35
+ new UpgradeDependencyVersion({packageName: "@types/react-dom", newVersion: "18.x"}),
31
36
  ];
32
37
  }
33
38
  }
@@ -1,4 +1,5 @@
1
1
  import {Recipe} from "@openrewrite/rewrite";
2
+ import {UpgradeDependencyVersion} from "@openrewrite/rewrite/javascript";
2
3
  import {UpgradeToReact18} from "../react18/upgrade-to-react-18";
3
4
  import {RemoveForwardRef} from "./remove-forward-ref";
4
5
  import {RemoveReactFC} from "./remove-react-fc";
@@ -61,6 +62,10 @@ export class UpgradeToReact19 extends Recipe {
61
62
  new NoImplicitRefCallbackReturn(),
62
63
  new DeprecatedReactTypes(),
63
64
  new ReplaceReactShallowRenderer(),
65
+ new UpgradeDependencyVersion({packageName: "react", newVersion: "19.x"}),
66
+ new UpgradeDependencyVersion({packageName: "react-dom", newVersion: "19.x"}),
67
+ new UpgradeDependencyVersion({packageName: "@types/react", newVersion: "19.x"}),
68
+ new UpgradeDependencyVersion({packageName: "@types/react-dom", newVersion: "19.x"}),
64
69
  ];
65
70
  }
66
71
  }