From 49d9f3fc495d160fa81f275507c80fbfbf703810 Mon Sep 17 00:00:00 2001 From: josephsavona Date: Thu, 8 May 2025 09:31:02 -0700 Subject: [PATCH] feat(compiler): Implement constant propagation for template literals (#33139) New take on #29716 ## Summary Template literals consisting entirely of constant values will be inlined to a string literal, effectively replacing the backticks with a double quote. This is done primarily to make the resulting instruction a string literal, so it can be processed further in constant propatation. So this is now correctly simplified to `true`: ```js `` === "" // now true `a${1}` === "a1" // now true ``` If a template string literal can only partially be comptime-evaluated, it is not that useful for dead code elimination or further constant folding steps and thus, is left as-is in that case. Same is true if the literal contains an array, object, symbol or function. ## How did you test this change? See added tests. DiffTrain build for [ac06829246287751e6b74bd99cd1b39d1aeba06a](https://github.com/facebook/react/commit/ac06829246287751e6b74bd99cd1b39d1aeba06a) --- compiled-rn/VERSION_NATIVE_FB | 2 +- .../react/react-dom/cjs/ReactDOM-dev.js | 4 +- .../react/react-dom/cjs/ReactDOM-prod.js | 4 +- .../react/react-dom/cjs/ReactDOM-profiling.js | 4 +- .../react/react-dom/cjs/ReactDOMClient-dev.js | 12 ++--- .../react-dom/cjs/ReactDOMClient-prod.js | 12 ++--- .../react-dom/cjs/ReactDOMClient-profiling.js | 12 ++--- .../react-dom/cjs/ReactDOMProfiling-dev.js | 12 ++--- .../react-dom/cjs/ReactDOMProfiling-prod.js | 12 ++--- .../cjs/ReactDOMProfiling-profiling.js | 12 ++--- .../cjs/ReactTestRenderer-dev.js | 8 ++-- .../cjs/ReactTestRenderer-prod.js | 8 ++-- .../cjs/ReactTestRenderer-profiling.js | 8 ++-- .../vendor/react/react/cjs/React-dev.js | 4 +- .../vendor/react/react/cjs/React-prod.js | 4 +- .../vendor/react/react/cjs/React-profiling.js | 4 +- .../Libraries/Renderer/REVISION | 2 +- .../implementations/ReactFabric-dev.fb.js | 6 +-- .../implementations/ReactFabric-prod.fb.js | 6 +-- .../ReactFabric-profiling.fb.js | 6 +-- .../ReactNativeRenderer-dev.fb.js | 10 ++-- .../ReactNativeRenderer-prod.fb.js | 10 ++-- .../ReactNativeRenderer-profiling.fb.js | 10 ++-- .../eslint-plugin-react-hooks.development.js | 48 ++++++++++++++++++- .../eslint-plugin-react-hooks.production.js | 48 ++++++++++++++++++- .../eslint-plugin-react-hooks/package.json | 2 +- 26 files changed, 181 insertions(+), 89 deletions(-) diff --git a/compiled-rn/VERSION_NATIVE_FB b/compiled-rn/VERSION_NATIVE_FB index 5fba65dd04..196e452752 100644 --- a/compiled-rn/VERSION_NATIVE_FB +++ b/compiled-rn/VERSION_NATIVE_FB @@ -1 +1 @@ -19.2.0-native-fb-38ef6550-20250508 \ No newline at end of file +19.2.0-native-fb-ac068292-20250508 \ No newline at end of file diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js index 48dcf43522..9995c325e1 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<0f0cdbc0ee2edcb4b4b9aa1388adab0b>> */ "use strict"; @@ -404,5 +404,5 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-native-fb-38ef6550-20250508"; + exports.version = "19.2.0-native-fb-ac068292-20250508"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js index 7711a4a7d7..d23a24162e 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<8662139ea2bf9515a221cba116f4a38a>> + * @generated SignedSource<> */ "use strict"; @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-native-fb-38ef6550-20250508"; +exports.version = "19.2.0-native-fb-ac068292-20250508"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js index 7711a4a7d7..d23a24162e 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<8662139ea2bf9515a221cba116f4a38a>> + * @generated SignedSource<> */ "use strict"; @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-native-fb-38ef6550-20250508"; +exports.version = "19.2.0-native-fb-ac068292-20250508"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js index 43060df45d..d81dc27aa3 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<51e9111c659f59f5093882ab323a900c>> */ /* @@ -26973,11 +26973,11 @@ __DEV__ && }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-native-fb-38ef6550-20250508" !== isomorphicReactPackageVersion) + if ("19.2.0-native-fb-ac068292-20250508" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-native-fb-38ef6550-20250508\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-native-fb-ac068292-20250508\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27014,10 +27014,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.2.0-native-fb-38ef6550-20250508", + version: "19.2.0-native-fb-ac068292-20250508", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-38ef6550-20250508" + reconcilerVersion: "19.2.0-native-fb-ac068292-20250508" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -27161,5 +27161,5 @@ __DEV__ && listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.2.0-native-fb-38ef6550-20250508"; + exports.version = "19.2.0-native-fb-ac068292-20250508"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js index f73b3a3004..c37c624df8 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ /* @@ -17069,14 +17069,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_2013 = React.version; if ( - "19.2.0-native-fb-38ef6550-20250508" !== + "19.2.0-native-fb-ac068292-20250508" !== isomorphicReactPackageVersion$jscomp$inline_2013 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2013, - "19.2.0-native-fb-38ef6550-20250508" + "19.2.0-native-fb-ac068292-20250508" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -17098,10 +17098,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2532 = { bundleType: 0, - version: "19.2.0-native-fb-38ef6550-20250508", + version: "19.2.0-native-fb-ac068292-20250508", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-38ef6550-20250508" + reconcilerVersion: "19.2.0-native-fb-ac068292-20250508" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2533 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17205,4 +17205,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.2.0-native-fb-38ef6550-20250508"; +exports.version = "19.2.0-native-fb-ac068292-20250508"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js index 9217921511..8dc24272ad 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<2ab97ce4fd0575f5c88e4f812d1b5a41>> + * @generated SignedSource<<1f9b996163be6768b9380267e581a634>> */ /* @@ -17779,14 +17779,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_2116 = React.version; if ( - "19.2.0-native-fb-38ef6550-20250508" !== + "19.2.0-native-fb-ac068292-20250508" !== isomorphicReactPackageVersion$jscomp$inline_2116 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2116, - "19.2.0-native-fb-38ef6550-20250508" + "19.2.0-native-fb-ac068292-20250508" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -17808,10 +17808,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2123 = { bundleType: 0, - version: "19.2.0-native-fb-38ef6550-20250508", + version: "19.2.0-native-fb-ac068292-20250508", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-38ef6550-20250508", + reconcilerVersion: "19.2.0-native-fb-ac068292-20250508", getLaneLabelMap: function () { for ( var map = new Map(), lane = 1, index$313 = 0; @@ -17930,4 +17930,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.2.0-native-fb-38ef6550-20250508"; +exports.version = "19.2.0-native-fb-ac068292-20250508"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js index 3d140d8ca9..ff5ef5eefb 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<7e0dd3ea54c5ac2f8e3fb7e8db73a191>> + * @generated SignedSource<<55b6d4a17ded6af6b3899a62acb7077d>> */ /* @@ -27034,11 +27034,11 @@ __DEV__ && }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.2.0-native-fb-38ef6550-20250508" !== isomorphicReactPackageVersion) + if ("19.2.0-native-fb-ac068292-20250508" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.2.0-native-fb-38ef6550-20250508\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.2.0-native-fb-ac068292-20250508\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -27075,10 +27075,10 @@ __DEV__ && !(function () { var internals = { bundleType: 1, - version: "19.2.0-native-fb-38ef6550-20250508", + version: "19.2.0-native-fb-ac068292-20250508", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-38ef6550-20250508" + reconcilerVersion: "19.2.0-native-fb-ac068292-20250508" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -27538,7 +27538,7 @@ __DEV__ && exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.2.0-native-fb-38ef6550-20250508"; + exports.version = "19.2.0-native-fb-ac068292-20250508"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js index bcafcb4e37..adb7441f56 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ /* @@ -17080,14 +17080,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_2014 = React.version; if ( - "19.2.0-native-fb-38ef6550-20250508" !== + "19.2.0-native-fb-ac068292-20250508" !== isomorphicReactPackageVersion$jscomp$inline_2014 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2014, - "19.2.0-native-fb-38ef6550-20250508" + "19.2.0-native-fb-ac068292-20250508" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -17109,10 +17109,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2535 = { bundleType: 0, - version: "19.2.0-native-fb-38ef6550-20250508", + version: "19.2.0-native-fb-ac068292-20250508", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-38ef6550-20250508" + reconcilerVersion: "19.2.0-native-fb-ac068292-20250508" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2536 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17370,4 +17370,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-native-fb-38ef6550-20250508"; +exports.version = "19.2.0-native-fb-ac068292-20250508"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js index 6443f8fca4..7bc4a073b1 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<7ce7b954fd069055f6881dff74e49e07>> + * @generated SignedSource<<3be605dcb9ae3379544766421df9b7e5>> */ /* @@ -17794,14 +17794,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_2117 = React.version; if ( - "19.2.0-native-fb-38ef6550-20250508" !== + "19.2.0-native-fb-ac068292-20250508" !== isomorphicReactPackageVersion$jscomp$inline_2117 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_2117, - "19.2.0-native-fb-38ef6550-20250508" + "19.2.0-native-fb-ac068292-20250508" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -17823,10 +17823,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2124 = { bundleType: 0, - version: "19.2.0-native-fb-38ef6550-20250508", + version: "19.2.0-native-fb-ac068292-20250508", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-38ef6550-20250508", + reconcilerVersion: "19.2.0-native-fb-ac068292-20250508", getLaneLabelMap: function () { for ( var map = new Map(), lane = 1, index$313 = 0; @@ -18099,7 +18099,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.2.0-native-fb-38ef6550-20250508"; +exports.version = "19.2.0-native-fb-ac068292-20250508"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js index b17da80598..2ee47182b4 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<5351ad1e776f88b320150ad862abbc78>> + * @generated SignedSource<> */ "use strict"; @@ -15653,10 +15653,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.2.0-native-fb-38ef6550-20250508", + version: "19.2.0-native-fb-ac068292-20250508", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-38ef6550-20250508" + reconcilerVersion: "19.2.0-native-fb-ac068292-20250508" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -15801,5 +15801,5 @@ __DEV__ && flushSyncWorkAcrossRoots_impl(0, !0)); } }; - exports.version = "19.2.0-native-fb-38ef6550-20250508"; + exports.version = "19.2.0-native-fb-ac068292-20250508"; })(); diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js index e3dc36f1e9..beaae1175e 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<9d1c1c6cc0a7fb94fd48869098398de1>> + * @generated SignedSource<<1ba432414a4dea396bc2b2c34a8345c0>> */ "use strict"; @@ -9893,10 +9893,10 @@ function wrapFiber(fiber) { } var internals$jscomp$inline_1445 = { bundleType: 0, - version: "19.2.0-native-fb-38ef6550-20250508", + version: "19.2.0-native-fb-ac068292-20250508", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-38ef6550-20250508" + reconcilerVersion: "19.2.0-native-fb-ac068292-20250508" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1446 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -10032,4 +10032,4 @@ exports.unstable_batchedUpdates = function (fn, a) { flushSyncWorkAcrossRoots_impl(0, !0)); } }; -exports.version = "19.2.0-native-fb-38ef6550-20250508"; +exports.version = "19.2.0-native-fb-ac068292-20250508"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js index 17cfb66184..1e875bd37b 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<21f523693ec3c8d22c0f059169bf3b5c>> + * @generated SignedSource<<01362a487fa1ab5a5e2bd1b95ca21253>> */ "use strict"; @@ -10513,10 +10513,10 @@ function wrapFiber(fiber) { } var internals$jscomp$inline_1253 = { bundleType: 0, - version: "19.2.0-native-fb-38ef6550-20250508", + version: "19.2.0-native-fb-ac068292-20250508", rendererPackageName: "react-test-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-38ef6550-20250508", + reconcilerVersion: "19.2.0-native-fb-ac068292-20250508", getLaneLabelMap: function () { for ( var map = new Map(), lane = 1, index$155 = 0; @@ -10667,4 +10667,4 @@ exports.unstable_batchedUpdates = function (fn, a) { flushSyncWorkAcrossRoots_impl(0, !0)); } }; -exports.version = "19.2.0-native-fb-38ef6550-20250508"; +exports.version = "19.2.0-native-fb-ac068292-20250508"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js index b5e74bde7c..d776e67478 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<7a7b34128c9dbbc307bf75f02e977572>> + * @generated SignedSource<> */ "use strict"; @@ -1412,7 +1412,7 @@ __DEV__ && exports.useTransition = function () { return resolveDispatcher().useTransition(); }; - exports.version = "19.2.0-native-fb-38ef6550-20250508"; + exports.version = "19.2.0-native-fb-ac068292-20250508"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js index 607234d1f4..341f1d233c 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<777c362a35b5b907131a46cc68bb556f>> */ "use strict"; @@ -587,4 +587,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.2.0-native-fb-38ef6550-20250508"; +exports.version = "19.2.0-native-fb-ac068292-20250508"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js index d3cc8a45d0..e794e678a6 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<4d385f63f7a94706579387bbf2b1d5d4>> + * @generated SignedSource<> */ "use strict"; @@ -591,7 +591,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.2.0-native-fb-38ef6550-20250508"; +exports.version = "19.2.0-native-fb-ac068292-20250508"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION index 0bd435cb7c..75d5869f1d 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION @@ -1 +1 @@ -38ef6550a88f7744f5dcd4a3de7af6f13a540be5 +ac06829246287751e6b74bd99cd1b39d1aeba06a diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index 7d8ee3121d..e4515c6f3b 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<996cf3a88b1a5a7e17629e45e8e4ba4f>> + * @generated SignedSource<<7f70495ee005aac73dd152f90fff72da>> */ "use strict"; @@ -17517,10 +17517,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.2.0-native-fb-38ef6550-20250508", + version: "19.2.0-native-fb-ac068292-20250508", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-38ef6550-20250508" + reconcilerVersion: "19.2.0-native-fb-ac068292-20250508" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index f342f70887..a225e24259 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<008e4197ca6133cfdb2372f1fb8fd9cb>> */ "use strict"; @@ -11235,10 +11235,10 @@ batchedUpdatesImpl = function (fn, a) { var roots = new Map(), internals$jscomp$inline_1254 = { bundleType: 0, - version: "19.2.0-native-fb-38ef6550-20250508", + version: "19.2.0-native-fb-ac068292-20250508", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-38ef6550-20250508" + reconcilerVersion: "19.2.0-native-fb-ac068292-20250508" }; null !== extraDevToolsConfig && (internals$jscomp$inline_1254.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index 1fd1151923..c21ff7a406 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<26ea81f988afc11cad57cddec441a844>> + * @generated SignedSource<<8d8168b3809cfc422dcecbda37fcc381>> */ "use strict"; @@ -11939,10 +11939,10 @@ batchedUpdatesImpl = function (fn, a) { var roots = new Map(), internals$jscomp$inline_1355 = { bundleType: 0, - version: "19.2.0-native-fb-38ef6550-20250508", + version: "19.2.0-native-fb-ac068292-20250508", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-38ef6550-20250508" + reconcilerVersion: "19.2.0-native-fb-ac068292-20250508" }; null !== extraDevToolsConfig && (internals$jscomp$inline_1355.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index a307ef6b85..4dd30fdcf3 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -17645,11 +17645,11 @@ __DEV__ && shouldSuspendImpl = newShouldSuspendImpl; }; var isomorphicReactPackageVersion = React.version; - if ("19.2.0-native-fb-38ef6550-20250508" !== isomorphicReactPackageVersion) + if ("19.2.0-native-fb-ac068292-20250508" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.2.0-native-fb-38ef6550-20250508\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.2.0-native-fb-ac068292-20250508\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -17675,10 +17675,10 @@ __DEV__ && (function () { var internals = { bundleType: 1, - version: "19.2.0-native-fb-38ef6550-20250508", + version: "19.2.0-native-fb-ac068292-20250508", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-38ef6550-20250508" + reconcilerVersion: "19.2.0-native-fb-ac068292-20250508" }; null !== extraDevToolsConfig && (internals.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index 00a3502f4f..839282a8e3 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<3757868a594c3ad196d8a2103ff0dbc0>> + * @generated SignedSource<<37b5cc6bf48f32b8476df22e53e57ff4>> */ "use strict"; @@ -11250,11 +11250,11 @@ function updateContainer(element, container, parentComponent, callback) { return lane; } var isomorphicReactPackageVersion = React.version; -if ("19.2.0-native-fb-38ef6550-20250508" !== isomorphicReactPackageVersion) +if ("19.2.0-native-fb-ac068292-20250508" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.2.0-native-fb-38ef6550-20250508\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.2.0-native-fb-ac068292-20250508\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -11303,10 +11303,10 @@ batchedUpdatesImpl = function (fn, a) { var roots = new Map(), internals$jscomp$inline_1305 = { bundleType: 0, - version: "19.2.0-native-fb-38ef6550-20250508", + version: "19.2.0-native-fb-ac068292-20250508", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-38ef6550-20250508" + reconcilerVersion: "19.2.0-native-fb-ac068292-20250508" }; null !== extraDevToolsConfig && (internals$jscomp$inline_1305.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index f358f24d54..873c35e45d 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<20b007a57c95f80fc30c5fbc9002b662>> + * @generated SignedSource<<8e694740266a64d38cc4840c83f93b92>> */ "use strict"; @@ -11952,11 +11952,11 @@ function updateContainer(element, container, parentComponent, callback) { return lane; } var isomorphicReactPackageVersion = React.version; -if ("19.2.0-native-fb-38ef6550-20250508" !== isomorphicReactPackageVersion) +if ("19.2.0-native-fb-ac068292-20250508" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.2.0-native-fb-38ef6550-20250508\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.2.0-native-fb-ac068292-20250508\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -12005,10 +12005,10 @@ batchedUpdatesImpl = function (fn, a) { var roots = new Map(), internals$jscomp$inline_1406 = { bundleType: 0, - version: "19.2.0-native-fb-38ef6550-20250508", + version: "19.2.0-native-fb-ac068292-20250508", rendererPackageName: "react-native-renderer", currentDispatcherRef: ReactSharedInternals, - reconcilerVersion: "19.2.0-native-fb-38ef6550-20250508" + reconcilerVersion: "19.2.0-native-fb-ac068292-20250508" }; null !== extraDevToolsConfig && (internals$jscomp$inline_1406.rendererConfig = extraDevToolsConfig); diff --git a/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js b/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js index 2a7927d5e0..fb7b176a5a 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +++ b/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js @@ -12,7 +12,7 @@ * @lightSyntaxTransform * @preventMunge * @oncall react_core - * @generated SignedSource<> + * @generated SignedSource<<970edb4f23f75a12c8642233f59a88ae>> */ 'use strict'; @@ -40447,6 +40447,52 @@ function evaluateInstruction(constants, instr) { } return null; } + case 'TemplateLiteral': { + if (value.subexprs.length === 0) { + const result = { + kind: 'Primitive', + value: value.quasis.map(q => q.cooked).join(''), + loc: value.loc, + }; + instr.value = result; + return result; + } + if (value.subexprs.length !== value.quasis.length - 1) { + return null; + } + if (value.quasis.some(q => q.cooked === undefined)) { + return null; + } + let quasiIndex = 0; + let resultString = value.quasis[quasiIndex].cooked; + ++quasiIndex; + for (const subExpr of value.subexprs) { + const subExprValue = read(constants, subExpr); + if (!subExprValue || subExprValue.kind !== 'Primitive') { + return null; + } + const expressionValue = subExprValue.value; + if (typeof expressionValue !== 'number' && + typeof expressionValue !== 'string' && + typeof expressionValue !== 'boolean' && + !(typeof expressionValue === 'object' && expressionValue === null)) { + return null; + } + const suffix = value.quasis[quasiIndex].cooked; + ++quasiIndex; + if (suffix === undefined) { + return null; + } + resultString = resultString.concat(expressionValue, suffix); + } + const result = { + kind: 'Primitive', + value: resultString, + loc: value.loc, + }; + instr.value = result; + return result; + } case 'LoadLocal': { const placeValue = read(constants, value.place); if (placeValue !== null) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js b/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js index 7d24d6bb0e..fa3d80e0d0 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +++ b/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js @@ -6,7 +6,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * @generated SignedSource<<5ea520dda276f0aed8050f583b9ccdc4>> + * @generated SignedSource<<1c918198659002c1074bc65f3beaa988>> */ 'use strict'; @@ -40226,6 +40226,52 @@ function evaluateInstruction(constants, instr) { } return null; } + case 'TemplateLiteral': { + if (value.subexprs.length === 0) { + const result = { + kind: 'Primitive', + value: value.quasis.map(q => q.cooked).join(''), + loc: value.loc, + }; + instr.value = result; + return result; + } + if (value.subexprs.length !== value.quasis.length - 1) { + return null; + } + if (value.quasis.some(q => q.cooked === undefined)) { + return null; + } + let quasiIndex = 0; + let resultString = value.quasis[quasiIndex].cooked; + ++quasiIndex; + for (const subExpr of value.subexprs) { + const subExprValue = read(constants, subExpr); + if (!subExprValue || subExprValue.kind !== 'Primitive') { + return null; + } + const expressionValue = subExprValue.value; + if (typeof expressionValue !== 'number' && + typeof expressionValue !== 'string' && + typeof expressionValue !== 'boolean' && + !(typeof expressionValue === 'object' && expressionValue === null)) { + return null; + } + const suffix = value.quasis[quasiIndex].cooked; + ++quasiIndex; + if (suffix === undefined) { + return null; + } + resultString = resultString.concat(expressionValue, suffix); + } + const result = { + kind: 'Primitive', + value: resultString, + loc: value.loc, + }; + instr.value = result; + return result; + } case 'LoadLocal': { const placeValue = read(constants, value.place); if (placeValue !== null) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/package.json b/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/package.json index fb6aee2720..1f20eb88ad 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/package.json +++ b/compiled-rn/facebook-fbsource/xplat/js/tools/eslint-plugin-react-hooks/package.json @@ -1,7 +1,7 @@ { "name": "eslint-plugin-react-hooks", "description": "ESLint rules for React Hooks", - "version": "0.0.0-experimental-38ef6550-20250508", + "version": "0.0.0-experimental-ac068292-20250508", "repository": { "type": "git", "url": "https://github.com/facebook/react.git",