From 67a7c45cea283b12e855041442babad47df6df29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= <40713406+tjzel@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:44:44 +0100 Subject: [PATCH] fix: restore `classic` runtime for @babel/preset-react (#6760) ## Summary Fixes https://github.com/software-mansion/react-native-reanimated/issues/6665 Applying the change I made to `react-native-builder-bob`: - https://github.com/callstack/react-native-builder-bob/pull/695 It restores `classic` runtime for the `@babel/react-native` preset used for generating ESModule code. The behavior was changed when we bumped builder-bob: - https://github.com/software-mansion/react-native-reanimated/pull/6485 ## Test plan I ran the `diff` for the version of `lib` without `jsxRuntime: classic` and with it - the differences are only in regards to `_jsx` usage. You can read more here: - https://github.com/software-mansion/react-native-reanimated/issues/6665 --- packages/react-native-reanimated/package.json | 5 +++-- yarn.lock | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/react-native-reanimated/package.json b/packages/react-native-reanimated/package.json index 50d8d9e89c6..e36e120959e 100644 --- a/packages/react-native-reanimated/package.json +++ b/packages/react-native-reanimated/package.json @@ -143,7 +143,7 @@ "prettier": "^3.3.3", "react": "18.3.1", "react-native": "^0.76.1", - "react-native-builder-bob": "0.30.2", + "react-native-builder-bob": "0.33.1", "react-native-gesture-handler": "2.20.2", "react-native-web": "0.19.11", "react-test-renderer": "18.2.0", @@ -158,7 +158,8 @@ [ "module", { - "esm": true + "esm": true, + "jsxRuntime": "classic" } ], "typescript" diff --git a/yarn.lock b/yarn.lock index 7736167a103..a87a4799e54 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17688,9 +17688,9 @@ __metadata: languageName: node linkType: hard -"react-native-builder-bob@npm:0.30.2": - version: 0.30.2 - resolution: "react-native-builder-bob@npm:0.30.2" +"react-native-builder-bob@npm:0.33.1": + version: 0.33.1 + resolution: "react-native-builder-bob@npm:0.33.1" dependencies: "@babel/core": "npm:^7.25.2" "@babel/plugin-transform-strict-mode": "npm:^7.24.7" @@ -17716,7 +17716,7 @@ __metadata: yargs: "npm:^17.5.1" bin: bob: bin/bob - checksum: 10/0a6f2321ce7ba4aa08a40e5d599c94fe4705afc7d67ac9d4e2400603dd91cfa6646afdc02697ff683dca3b2654b1701bab4114c3548f4dfa0c9327a74a8a8a48 + checksum: 10/c4aaefdc1f82a88ce66c5b448ed851213ca614c777a775cb0772ab80e75852761b915d715ed6f58f99670b1b2fba6435e1d9c03445b9ba8eb44befeb77f5b532 languageName: node linkType: hard @@ -17877,7 +17877,7 @@ __metadata: prettier: "npm:^3.3.3" react: "npm:18.3.1" react-native: "npm:^0.76.1" - react-native-builder-bob: "npm:0.30.2" + react-native-builder-bob: "npm:0.33.1" react-native-gesture-handler: "npm:2.20.2" react-native-web: "npm:0.19.11" react-test-renderer: "npm:18.2.0"