From 303ea6378880e0a3abb21159ae287852621aed80 Mon Sep 17 00:00:00 2001 From: sebmarkbage Date: Mon, 22 Apr 2024 16:44:55 +0000 Subject: [PATCH] Rename the react.element symbol to react.transitional.element (#28813) We have changed the shape (and the runtime) of React Elements. To help avoid precompiled or inlined JSX having subtle breakages or deopting hidden classes, I renamed the symbol so that we can early error if private implementation details are used or mismatching versions are used. Why "transitional"? Well, because this is not the last time we'll change the shape. This is just a stepping stone to removing the `ref` field on the elements in the next version so we'll likely have to do it again. DiffTrain build for commit https://github.com/facebook/react/commit/3b551c82844bcfde51f0febb8e42c1a0d777df2c. --- .../vendor/react-is/cjs/ReactIs-dev.js | 29 ++++++------ .../vendor/react-is/cjs/ReactIs-prod.js | 14 +++--- .../vendor/react-is/cjs/ReactIs-profiling.js | 14 +++--- .../cjs/ReactTestRenderer-dev.js | 15 ++++--- .../cjs/ReactTestRenderer-prod.js | 20 +++++---- .../cjs/ReactTestRenderer-profiling.js | 20 +++++---- .../vendor/react/cjs/JSXDEVRuntime-dev.js | 33 +++++++------- .../vendor/react/cjs/JSXRuntime-dev.js | 33 +++++++------- .../vendor/react/cjs/JSXRuntime-prod.js | 14 +++--- .../vendor/react/cjs/JSXRuntime-profiling.js | 14 +++--- .../RKJSModules/vendor/react/cjs/React-dev.js | 45 ++++++++++--------- .../vendor/react/cjs/React-prod.js | 20 ++++----- .../vendor/react/cjs/React-profiling.js | 20 ++++----- .../Libraries/Renderer/REVISION | 2 +- .../implementations/ReactFabric-dev.fb.js | 15 ++++--- .../implementations/ReactFabric-prod.fb.js | 20 +++++---- .../ReactFabric-profiling.fb.js | 20 +++++---- .../ReactNativeRenderer-dev.fb.js | 15 ++++--- .../ReactNativeRenderer-prod.fb.js | 20 +++++---- .../ReactNativeRenderer-profiling.fb.js | 20 +++++---- 20 files changed, 223 insertions(+), 180 deletions(-) diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-dev.js index fa2bc4db06197..1eef5613da096 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<4b798dcd431887c30b264d36a3b13441>> + * @generated SignedSource<<67ecfa6f3ffb08a7102950c78e1002d4>> */ 'use strict'; @@ -18,11 +18,23 @@ if (__DEV__) { var dynamicFlagsUntyped = require('ReactNativeInternalFeatureFlags'); -// ATTENTION +// Re-export dynamic flags from the internal module. +var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on +// the exports object every time a flag is read. + +var enableRenderableContext = dynamicFlags.enableRenderableContext; + // The rest of the flags are static for better dead code elimination. +var enableDebugTracing = false; +var enableScopeAPI = false; +var enableLegacyHidden = false; +var enableTransitionTracing = false; + // When adding new symbols to this file, // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' // The Symbol used to tag the ReactElement-like types. -var REACT_ELEMENT_TYPE = Symbol.for('react.element'); + +var REACT_LEGACY_ELEMENT_TYPE = Symbol.for('react.element'); +var REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE; var REACT_PORTAL_TYPE = Symbol.for('react.portal'); var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); @@ -38,17 +50,6 @@ var REACT_MEMO_TYPE = Symbol.for('react.memo'); var REACT_LAZY_TYPE = Symbol.for('react.lazy'); var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen'); -// Re-export dynamic flags from the internal module. -var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on -// the exports object every time a flag is read. - -var enableRenderableContext = dynamicFlags.enableRenderableContext; - // The rest of the flags are static for better dead code elimination. -var enableDebugTracing = false; -var enableScopeAPI = false; -var enableLegacyHidden = false; -var enableTransitionTracing = false; - var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference'); function isValidElementType(type) { if (typeof type === 'string' || typeof type === 'function') { diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-prod.js index 433157607418a..49ff2219b0718 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-prod.js @@ -7,12 +7,13 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<8b4e45fcdea67ae633a64f641072fdb0>> + * @generated SignedSource<> */ "use strict"; -var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"), - REACT_ELEMENT_TYPE = Symbol.for("react.element"), +var enableRenderableContext = + require("ReactNativeInternalFeatureFlags").enableRenderableContext, + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), @@ -26,13 +27,12 @@ var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), - enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"); function typeOf(object) { if ("object" === typeof object && null !== object) { var $$typeof = object.$$typeof; switch ($$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: switch (((object = object.type), object)) { case REACT_FRAGMENT_TYPE: case REACT_PROFILER_TYPE: @@ -67,7 +67,7 @@ exports.ContextConsumer = enableRenderableContext ? REACT_CONSUMER_TYPE : REACT_CONTEXT_TYPE; exports.ContextProvider = ContextProvider; -exports.Element = REACT_ELEMENT_TYPE; +exports.Element = REACT_LEGACY_ELEMENT_TYPE; exports.ForwardRef = REACT_FORWARD_REF_TYPE; exports.Fragment = REACT_FRAGMENT_TYPE; exports.Lazy = REACT_LAZY_TYPE; @@ -91,7 +91,7 @@ exports.isElement = function (object) { return ( "object" === typeof object && null !== object && - object.$$typeof === REACT_ELEMENT_TYPE + object.$$typeof === REACT_LEGACY_ELEMENT_TYPE ); }; exports.isForwardRef = function (object) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-profiling.js index 433157607418a..49ff2219b0718 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-is/cjs/ReactIs-profiling.js @@ -7,12 +7,13 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<8b4e45fcdea67ae633a64f641072fdb0>> + * @generated SignedSource<> */ "use strict"; -var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"), - REACT_ELEMENT_TYPE = Symbol.for("react.element"), +var enableRenderableContext = + require("ReactNativeInternalFeatureFlags").enableRenderableContext, + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), @@ -26,13 +27,12 @@ var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), - enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"); function typeOf(object) { if ("object" === typeof object && null !== object) { var $$typeof = object.$$typeof; switch ($$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: switch (((object = object.type), object)) { case REACT_FRAGMENT_TYPE: case REACT_PROFILER_TYPE: @@ -67,7 +67,7 @@ exports.ContextConsumer = enableRenderableContext ? REACT_CONSUMER_TYPE : REACT_CONTEXT_TYPE; exports.ContextProvider = ContextProvider; -exports.Element = REACT_ELEMENT_TYPE; +exports.Element = REACT_LEGACY_ELEMENT_TYPE; exports.ForwardRef = REACT_FORWARD_REF_TYPE; exports.Fragment = REACT_FRAGMENT_TYPE; exports.Lazy = REACT_LAZY_TYPE; @@ -91,7 +91,7 @@ exports.isElement = function (object) { return ( "object" === typeof object && null !== object && - object.$$typeof === REACT_ELEMENT_TYPE + object.$$typeof === REACT_LEGACY_ELEMENT_TYPE ); }; exports.isForwardRef = function (object) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js index e757700502aee..fc49c736aa591 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<72055afa4818e8a565d07875c49b2d9d>> + * @generated SignedSource<<46b519886f2205ba3e56e9120fea4a08>> */ 'use strict'; @@ -168,11 +168,12 @@ var HostHoistable = 26; var HostSingleton = 27; var IncompleteFunctionComponent = 28; -// ATTENTION // When adding new symbols to this file, // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' // The Symbol used to tag the ReactElement-like types. -var REACT_ELEMENT_TYPE = Symbol.for('react.element'); + +var REACT_LEGACY_ELEMENT_TYPE = Symbol.for('react.element'); +var REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE; var REACT_PORTAL_TYPE = Symbol.for('react.portal'); var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); @@ -5422,7 +5423,11 @@ function coerceRef(returnFiber, current, workInProgress, element) { } function throwOnInvalidObjectType(returnFiber, newChild) { - // $FlowFixMe[method-unbinding] + if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE) { + throw new Error('A React Element from an older version of React was rendered. ' + 'This is not supported. It can happen if:\n' + '- Multiple copies of the "react" package is used.\n' + '- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n' + '- A compiler tries to "inline" JSX instead of using the runtime.'); + } // $FlowFixMe[method-unbinding] + + var childString = Object.prototype.toString.call(newChild); throw new Error("Objects are not valid as a React child (found: " + (childString === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : childString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.'); } @@ -22978,7 +22983,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-canary-acecb093'; +var ReactVersion = '19.0.0-canary-faeca3c1'; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js index c2e1385d2c0c9..5fce45490c03b 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<8230647a80c4b86b8cf8384768883557>> + * @generated SignedSource<<9553b8ed4acfe1f92cf2f7113b446768>> */ "use strict"; @@ -31,7 +31,7 @@ function _createClass(Constructor, protoProps, staticProps) { var assign = Object.assign, ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, - REACT_ELEMENT_TYPE = Symbol.for("react.element"), + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), @@ -1385,6 +1385,10 @@ function unwrapThenable(thenable) { return trackUsedThenable(thenableState$1, thenable, index); } function throwOnInvalidObjectType(returnFiber, newChild) { + if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE) + throw Error( + 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.' + ); returnFiber = Object.prototype.toString.call(newChild); throw Error( "Objects are not valid as a React child (found: " + @@ -1545,7 +1549,7 @@ function createChildReconciler(shouldTrackSideEffects) { ); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return ( (lanes = createFiberFromTypeAndProps( newChild.type, @@ -1608,7 +1612,7 @@ function createChildReconciler(shouldTrackSideEffects) { : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return newChild.key === key ? updateElement(returnFiber, oldFiber, newChild, lanes) : null; @@ -1662,7 +1666,7 @@ function createChildReconciler(shouldTrackSideEffects) { ); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return ( (existingChildren = existingChildren.get( @@ -1893,7 +1897,7 @@ function createChildReconciler(shouldTrackSideEffects) { (newChild = newChild.props.children); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: a: { for (var key = newChild.key; null !== currentFirstChild; ) { if (currentFirstChild.key === key) { @@ -9144,7 +9148,7 @@ var devToolsConfig$jscomp$inline_1019 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "19.0.0-canary-a8200c0a", + version: "19.0.0-canary-926deca4", rendererPackageName: "react-test-renderer" }; var internals$jscomp$inline_1238 = { @@ -9175,7 +9179,7 @@ var internals$jscomp$inline_1238 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-a8200c0a" + reconcilerVersion: "19.0.0-canary-926deca4" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1239 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js index 75e1e7d7a0772..49923b25a6fdb 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<9f8b5b89043962a79b6b2123a526bf46>> + * @generated SignedSource<<3a52338cfe089716cbc5c55bc70f1def>> */ "use strict"; @@ -31,7 +31,7 @@ function _createClass(Constructor, protoProps, staticProps) { var assign = Object.assign, ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, - REACT_ELEMENT_TYPE = Symbol.for("react.element"), + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), @@ -1473,6 +1473,10 @@ function unwrapThenable(thenable) { return trackUsedThenable(thenableState$1, thenable, index); } function throwOnInvalidObjectType(returnFiber, newChild) { + if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE) + throw Error( + 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.' + ); returnFiber = Object.prototype.toString.call(newChild); throw Error( "Objects are not valid as a React child (found: " + @@ -1633,7 +1637,7 @@ function createChildReconciler(shouldTrackSideEffects) { ); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return ( (lanes = createFiberFromTypeAndProps( newChild.type, @@ -1696,7 +1700,7 @@ function createChildReconciler(shouldTrackSideEffects) { : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return newChild.key === key ? updateElement(returnFiber, oldFiber, newChild, lanes) : null; @@ -1750,7 +1754,7 @@ function createChildReconciler(shouldTrackSideEffects) { ); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return ( (existingChildren = existingChildren.get( @@ -1981,7 +1985,7 @@ function createChildReconciler(shouldTrackSideEffects) { (newChild = newChild.props.children); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: a: { for (var key = newChild.key; null !== currentFirstChild; ) { if (currentFirstChild.key === key) { @@ -9760,7 +9764,7 @@ var devToolsConfig$jscomp$inline_1101 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "19.0.0-canary-359342b1", + version: "19.0.0-canary-1895753d", rendererPackageName: "react-test-renderer" }; (function (internals) { @@ -9804,7 +9808,7 @@ var devToolsConfig$jscomp$inline_1101 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-359342b1" + reconcilerVersion: "19.0.0-canary-1895753d" }); exports._Scheduler = Scheduler; exports.act = act; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXDEVRuntime-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXDEVRuntime-dev.js index b637962008d68..42ac7789f2534 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXDEVRuntime-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXDEVRuntime-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ 'use strict'; @@ -19,11 +19,24 @@ if (__DEV__) { var React = require('react'); var dynamicFlagsUntyped = require('ReactNativeInternalFeatureFlags'); -// ATTENTION +// Re-export dynamic flags from the internal module. +var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on +// the exports object every time a flag is read. + +var enableComponentStackLocations = dynamicFlags.enableComponentStackLocations, + enableRenderableContext = dynamicFlags.enableRenderableContext, + disableDefaultPropsExceptForClasses = dynamicFlags.disableDefaultPropsExceptForClasses; // The rest of the flags are static for better dead code elimination. +var enableDebugTracing = false; +var enableScopeAPI = false; +var enableLegacyHidden = false; +var enableTransitionTracing = false; + // When adding new symbols to this file, // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' // The Symbol used to tag the ReactElement-like types. -var REACT_ELEMENT_TYPE = Symbol.for('react.element'); + +var REACT_LEGACY_ELEMENT_TYPE = Symbol.for('react.element'); +var REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE; var REACT_PORTAL_TYPE = Symbol.for('react.portal'); var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); @@ -92,18 +105,6 @@ function printWarning(level, format, args) { } } -// Re-export dynamic flags from the internal module. -var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on -// the exports object every time a flag is read. - -var enableComponentStackLocations = dynamicFlags.enableComponentStackLocations, - enableRenderableContext = dynamicFlags.enableRenderableContext, - disableDefaultPropsExceptForClasses = dynamicFlags.disableDefaultPropsExceptForClasses; // The rest of the flags are static for better dead code elimination. -var enableDebugTracing = false; -var enableScopeAPI = false; -var enableLegacyHidden = false; -var enableTransitionTracing = false; - function getWrappedName$1(outerType, innerType, wrapperName) { var displayName = outerType.displayName; @@ -1006,7 +1007,7 @@ function defineRefPropWarningGetter(props, displayName) { /** * Factory method to create a new React element. This no longer adheres to * the class pattern, so do not use new to call it. Also, instanceof check - * will not work. Instead test $$typeof field against Symbol.for('react.element') to check + * will not work. Instead test $$typeof field against Symbol.for('react.transitional.element') to check * if something is a React Element. * * @param {*} type diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-dev.js index 7c2ac70b2200e..1a0c41ffbf842 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<6786f79c50baa1d713a06b4ed12afb60>> + * @generated SignedSource<<2c29550aadda1d8003d31abee3051694>> */ 'use strict'; @@ -19,11 +19,24 @@ if (__DEV__) { var React = require('react'); var dynamicFlagsUntyped = require('ReactNativeInternalFeatureFlags'); -// ATTENTION +// Re-export dynamic flags from the internal module. +var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on +// the exports object every time a flag is read. + +var enableComponentStackLocations = dynamicFlags.enableComponentStackLocations, + enableRenderableContext = dynamicFlags.enableRenderableContext, + disableDefaultPropsExceptForClasses = dynamicFlags.disableDefaultPropsExceptForClasses; // The rest of the flags are static for better dead code elimination. +var enableDebugTracing = false; +var enableScopeAPI = false; +var enableLegacyHidden = false; +var enableTransitionTracing = false; + // When adding new symbols to this file, // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' // The Symbol used to tag the ReactElement-like types. -var REACT_ELEMENT_TYPE = Symbol.for('react.element'); + +var REACT_LEGACY_ELEMENT_TYPE = Symbol.for('react.element'); +var REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE; var REACT_PORTAL_TYPE = Symbol.for('react.portal'); var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); @@ -92,18 +105,6 @@ function printWarning(level, format, args) { } } -// Re-export dynamic flags from the internal module. -var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on -// the exports object every time a flag is read. - -var enableComponentStackLocations = dynamicFlags.enableComponentStackLocations, - enableRenderableContext = dynamicFlags.enableRenderableContext, - disableDefaultPropsExceptForClasses = dynamicFlags.disableDefaultPropsExceptForClasses; // The rest of the flags are static for better dead code elimination. -var enableDebugTracing = false; -var enableScopeAPI = false; -var enableLegacyHidden = false; -var enableTransitionTracing = false; - function getWrappedName$1(outerType, innerType, wrapperName) { var displayName = outerType.displayName; @@ -1006,7 +1007,7 @@ function defineRefPropWarningGetter(props, displayName) { /** * Factory method to create a new React element. This no longer adheres to * the class pattern, so do not use new to call it. Also, instanceof check - * will not work. Instead test $$typeof field against Symbol.for('react.element') to check + * will not work. Instead test $$typeof field against Symbol.for('react.transitional.element') to check * if something is a React Element. * * @param {*} type diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-prod.js index fa40034feb6e1..36af6a127d99d 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-prod.js @@ -7,13 +7,15 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<881038bf21de122675cb4eb0358c5cfd>> + * @generated SignedSource<<62661c1c6567dce2b9c9ba9b3170fc16>> */ "use strict"; var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"), React = require("react"), - REACT_ELEMENT_TYPE = Symbol.for("react.element"), + disableDefaultPropsExceptForClasses = + dynamicFlagsUntyped.disableDefaultPropsExceptForClasses, + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); function formatProdErrorMessage(code) { var url = "https://react.dev/errors/" + code; @@ -30,10 +32,8 @@ function formatProdErrorMessage(code) { " for the full message or use the non-minified dev environment for full errors and additional helpful warnings." ); } -var disableDefaultPropsExceptForClasses = - dynamicFlagsUntyped.disableDefaultPropsExceptForClasses, - ReactSharedInternals = - React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; +var ReactSharedInternals = + React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; function jsxProd(type, config, maybeKey) { var key = null, ref = null; @@ -63,7 +63,7 @@ function jsxProd(type, config, maybeKey) { (maybeKey[propName$0] = config[propName$0]); } return { - $$typeof: REACT_ELEMENT_TYPE, + $$typeof: REACT_LEGACY_ELEMENT_TYPE, type: type, key: key, ref: ref, diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-profiling.js index fa40034feb6e1..36af6a127d99d 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-profiling.js @@ -7,13 +7,15 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<881038bf21de122675cb4eb0358c5cfd>> + * @generated SignedSource<<62661c1c6567dce2b9c9ba9b3170fc16>> */ "use strict"; var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"), React = require("react"), - REACT_ELEMENT_TYPE = Symbol.for("react.element"), + disableDefaultPropsExceptForClasses = + dynamicFlagsUntyped.disableDefaultPropsExceptForClasses, + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); function formatProdErrorMessage(code) { var url = "https://react.dev/errors/" + code; @@ -30,10 +32,8 @@ function formatProdErrorMessage(code) { " for the full message or use the non-minified dev environment for full errors and additional helpful warnings." ); } -var disableDefaultPropsExceptForClasses = - dynamicFlagsUntyped.disableDefaultPropsExceptForClasses, - ReactSharedInternals = - React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; +var ReactSharedInternals = + React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; function jsxProd(type, config, maybeKey) { var key = null, ref = null; @@ -63,7 +63,7 @@ function jsxProd(type, config, maybeKey) { (maybeKey[propName$0] = config[propName$0]); } return { - $$typeof: REACT_ELEMENT_TYPE, + $$typeof: REACT_LEGACY_ELEMENT_TYPE, type: type, key: key, ref: ref, diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js index c396e4d31d401..38480d1aab91f 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<745c28cba28ff3a4a3a391cfdfdd1c1b>> + * @generated SignedSource<> */ 'use strict'; @@ -27,13 +27,31 @@ if ( } var dynamicFlagsUntyped = require('ReactNativeInternalFeatureFlags'); -var ReactVersion = '19.0.0-canary-e8808e1d'; +var ReactVersion = '19.0.0-canary-086a539f'; + +// Re-export dynamic flags from the internal module. +var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on +// the exports object every time a flag is read. + +var enableAsyncActions = dynamicFlags.enableAsyncActions, + enableComponentStackLocations = dynamicFlags.enableComponentStackLocations, + enableRenderableContext = dynamicFlags.enableRenderableContext, + disableDefaultPropsExceptForClasses = dynamicFlags.disableDefaultPropsExceptForClasses; // The rest of the flags are static for better dead code elimination. +var enableDebugTracing = false; +var enableScopeAPI = false; +var enableLegacyHidden = false; +var enableTransitionTracing = false; +// because JSX is an extremely hot path. + +var enableRefAsProp = false; +var disableLegacyMode = false; -// ATTENTION // When adding new symbols to this file, // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' // The Symbol used to tag the ReactElement-like types. -var REACT_ELEMENT_TYPE = Symbol.for('react.element'); + +var REACT_LEGACY_ELEMENT_TYPE = Symbol.for('react.element'); +var REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE; var REACT_PORTAL_TYPE = Symbol.for('react.portal'); var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); @@ -68,23 +86,6 @@ function getIteratorFn(maybeIterable) { return null; } -// Re-export dynamic flags from the internal module. -var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on -// the exports object every time a flag is read. - -var enableAsyncActions = dynamicFlags.enableAsyncActions, - enableComponentStackLocations = dynamicFlags.enableComponentStackLocations, - enableRenderableContext = dynamicFlags.enableRenderableContext, - disableDefaultPropsExceptForClasses = dynamicFlags.disableDefaultPropsExceptForClasses; // The rest of the flags are static for better dead code elimination. -var enableDebugTracing = false; -var enableScopeAPI = false; -var enableLegacyHidden = false; -var enableTransitionTracing = false; -// because JSX is an extremely hot path. - -var enableRefAsProp = false; -var disableLegacyMode = false; - var ReactSharedInternals = { H: null, C: null, @@ -1307,7 +1308,7 @@ function defineRefPropWarningGetter(props, displayName) { /** * Factory method to create a new React element. This no longer adheres to * the class pattern, so do not use new to call it. Also, instanceof check - * will not work. Instead test $$typeof field against Symbol.for('react.element') to check + * will not work. Instead test $$typeof field against Symbol.for('react.transitional.element') to check * if something is a React Element. * * @param {*} type diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js index 2347230b31dd1..5f0d22bb58368 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js @@ -7,12 +7,16 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<00252b7815c38ef0d757b44717a43f7d>> + * @generated SignedSource<> */ "use strict"; var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"), - REACT_ELEMENT_TYPE = Symbol.for("react.element"), + enableAsyncActions = dynamicFlagsUntyped.enableAsyncActions, + enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext, + disableDefaultPropsExceptForClasses = + dynamicFlagsUntyped.disableDefaultPropsExceptForClasses, + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), @@ -82,15 +86,11 @@ pureComponentPrototype.constructor = PureComponent; assign(pureComponentPrototype, Component.prototype); pureComponentPrototype.isPureReactComponent = !0; var isArrayImpl = Array.isArray, - enableAsyncActions = dynamicFlagsUntyped.enableAsyncActions, - enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext, - disableDefaultPropsExceptForClasses = - dynamicFlagsUntyped.disableDefaultPropsExceptForClasses, ReactSharedInternals = { H: null, C: null, T: null, owner: null }, hasOwnProperty = Object.prototype.hasOwnProperty; function ReactElement(type, key, _ref, self, source, owner, props) { return { - $$typeof: REACT_ELEMENT_TYPE, + $$typeof: REACT_LEGACY_ELEMENT_TYPE, type: type, key: key, ref: _ref, @@ -142,7 +142,7 @@ function isValidElement(object) { return ( "object" === typeof object && null !== object && - object.$$typeof === REACT_ELEMENT_TYPE + object.$$typeof === REACT_LEGACY_ELEMENT_TYPE ); } function coerceStringRef(mixedRef, owner, type) { @@ -239,7 +239,7 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { break; case "object": switch (children.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: case REACT_PORTAL_TYPE: invokeCallback = !0; break; @@ -679,4 +679,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-canary-3277b133"; +exports.version = "19.0.0-canary-55ecd63c"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js index 1c52dbc17b96b..c3a9fc241c09e 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<9fd3393509037fbe670735ccea6d8cca>> + * @generated SignedSource<> */ "use strict"; @@ -16,7 +16,11 @@ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"), - REACT_ELEMENT_TYPE = Symbol.for("react.element"), + enableAsyncActions = dynamicFlagsUntyped.enableAsyncActions, + enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext, + disableDefaultPropsExceptForClasses = + dynamicFlagsUntyped.disableDefaultPropsExceptForClasses, + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), @@ -86,15 +90,11 @@ pureComponentPrototype.constructor = PureComponent; assign(pureComponentPrototype, Component.prototype); pureComponentPrototype.isPureReactComponent = !0; var isArrayImpl = Array.isArray, - enableAsyncActions = dynamicFlagsUntyped.enableAsyncActions, - enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext, - disableDefaultPropsExceptForClasses = - dynamicFlagsUntyped.disableDefaultPropsExceptForClasses, ReactSharedInternals = { H: null, C: null, T: null, owner: null }, hasOwnProperty = Object.prototype.hasOwnProperty; function ReactElement(type, key, _ref, self, source, owner, props) { return { - $$typeof: REACT_ELEMENT_TYPE, + $$typeof: REACT_LEGACY_ELEMENT_TYPE, type: type, key: key, ref: _ref, @@ -146,7 +146,7 @@ function isValidElement(object) { return ( "object" === typeof object && null !== object && - object.$$typeof === REACT_ELEMENT_TYPE + object.$$typeof === REACT_LEGACY_ELEMENT_TYPE ); } function coerceStringRef(mixedRef, owner, type) { @@ -243,7 +243,7 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { break; case "object": switch (children.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: case REACT_PORTAL_TYPE: invokeCallback = !0; break; @@ -683,7 +683,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-canary-52747c26"; +exports.version = "19.0.0-canary-966142ac"; "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 ec5bdd3366836..177a8c5d4e98d 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 @@ -db913d8e17db25045e0518f3621f1640f2390525 +3b551c82844bcfde51f0febb8e42c1a0d777df2c 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 3b123ddae400d..84e09a0424ec0 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<> + * @generated SignedSource<<50530e784c9e1753cdf1c441923f9a3d>> */ 'use strict'; @@ -4457,11 +4457,12 @@ function set(key, value) { key._reactInternals = value; } -// ATTENTION // When adding new symbols to this file, // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' // The Symbol used to tag the ReactElement-like types. -var REACT_ELEMENT_TYPE = Symbol.for('react.element'); + +var REACT_LEGACY_ELEMENT_TYPE = Symbol.for('react.element'); +var REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE; var REACT_PORTAL_TYPE = Symbol.for('react.portal'); var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); @@ -8382,7 +8383,11 @@ function coerceRef(returnFiber, current, workInProgress, element) { } function throwOnInvalidObjectType(returnFiber, newChild) { - // $FlowFixMe[method-unbinding] + if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE) { + throw new Error('A React Element from an older version of React was rendered. ' + 'This is not supported. It can happen if:\n' + '- Multiple copies of the "react" package is used.\n' + '- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n' + '- A compiler tries to "inline" JSX instead of using the runtime.'); + } // $FlowFixMe[method-unbinding] + + var childString = Object.prototype.toString.call(newChild); throw new Error("Objects are not valid as a React child (found: " + (childString === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : childString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.'); } @@ -26048,7 +26053,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-canary-f7d342a2'; +var ReactVersion = '19.0.0-canary-10068bda'; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol 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 f95f11a2b2830..f3b199d253334 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<<885ed33c17f9bf322d3f754c50d26ed9>> + * @generated SignedSource<<51142bb6cdcde9e8faffbaa114b1cbc7>> */ "use strict"; @@ -1652,7 +1652,7 @@ ResponderEventPlugin.injection.injectGlobalResponderHandler({ ); } }); -var REACT_ELEMENT_TYPE = Symbol.for("react.element"), +var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), @@ -2910,6 +2910,10 @@ function unwrapThenable(thenable) { return trackUsedThenable(thenableState$1, thenable, index); } function throwOnInvalidObjectType(returnFiber, newChild) { + if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE) + throw Error( + 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.' + ); returnFiber = Object.prototype.toString.call(newChild); throw Error( "Objects are not valid as a React child (found: " + @@ -3070,7 +3074,7 @@ function createChildReconciler(shouldTrackSideEffects) { ); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return ( (lanes = createFiberFromTypeAndProps( newChild.type, @@ -3133,7 +3137,7 @@ function createChildReconciler(shouldTrackSideEffects) { : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return newChild.key === key ? updateElement(returnFiber, oldFiber, newChild, lanes) : null; @@ -3187,7 +3191,7 @@ function createChildReconciler(shouldTrackSideEffects) { ); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return ( (existingChildren = existingChildren.get( @@ -3418,7 +3422,7 @@ function createChildReconciler(shouldTrackSideEffects) { (newChild = newChild.props.children); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: a: { for (var key = newChild.key; null !== currentFirstChild; ) { if (currentFirstChild.key === key) { @@ -10602,7 +10606,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1099 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "19.0.0-canary-d7b022bb", + version: "19.0.0-canary-7eb4df81", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10645,7 +10649,7 @@ var internals$jscomp$inline_1366 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-d7b022bb" + reconcilerVersion: "19.0.0-canary-7eb4df81" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1367 = __REACT_DEVTOOLS_GLOBAL_HOOK__; 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 20f974e88cd2b..1f45bf5076b00 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<<0fd40d36a058297c5f28d3505e638983>> + * @generated SignedSource<<3b7c022bad1965296de8faec24940d21>> */ "use strict"; @@ -1774,7 +1774,7 @@ ResponderEventPlugin.injection.injectGlobalResponderHandler({ ); } }); -var REACT_ELEMENT_TYPE = Symbol.for("react.element"), +var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), @@ -3032,6 +3032,10 @@ function unwrapThenable(thenable) { return trackUsedThenable(thenableState$1, thenable, index); } function throwOnInvalidObjectType(returnFiber, newChild) { + if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE) + throw Error( + 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.' + ); returnFiber = Object.prototype.toString.call(newChild); throw Error( "Objects are not valid as a React child (found: " + @@ -3192,7 +3196,7 @@ function createChildReconciler(shouldTrackSideEffects) { ); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return ( (lanes = createFiberFromTypeAndProps( newChild.type, @@ -3255,7 +3259,7 @@ function createChildReconciler(shouldTrackSideEffects) { : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return newChild.key === key ? updateElement(returnFiber, oldFiber, newChild, lanes) : null; @@ -3309,7 +3313,7 @@ function createChildReconciler(shouldTrackSideEffects) { ); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return ( (existingChildren = existingChildren.get( @@ -3540,7 +3544,7 @@ function createChildReconciler(shouldTrackSideEffects) { (newChild = newChild.props.children); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: a: { for (var key = newChild.key; null !== currentFirstChild; ) { if (currentFirstChild.key === key) { @@ -11307,7 +11311,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1179 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "19.0.0-canary-9e21665c", + version: "19.0.0-canary-865489dc", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -11363,7 +11367,7 @@ var roots = new Map(), scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-9e21665c" + reconcilerVersion: "19.0.0-canary-865489dc" }); exports.createPortal = function (children, containerTag) { return createPortal$1( 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 9772c0dce82d0..8ed4096b658ca 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<<067d8fee132e988882b3b0dcb3c6e6da>> + * @generated SignedSource<<1805be4fd01dd300dab1d1eb6fec9931>> */ 'use strict'; @@ -2361,11 +2361,12 @@ var enableLazyContextPropagation = false; var enableLegacyHidden = false; var disableLegacyMode = false; -// ATTENTION // When adding new symbols to this file, // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' // The Symbol used to tag the ReactElement-like types. -var REACT_ELEMENT_TYPE = Symbol.for('react.element'); + +var REACT_LEGACY_ELEMENT_TYPE = Symbol.for('react.element'); +var REACT_ELEMENT_TYPE = REACT_LEGACY_ELEMENT_TYPE; var REACT_PORTAL_TYPE = Symbol.for('react.portal'); var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); @@ -8621,7 +8622,11 @@ function coerceRef(returnFiber, current, workInProgress, element) { } function throwOnInvalidObjectType(returnFiber, newChild) { - // $FlowFixMe[method-unbinding] + if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE) { + throw new Error('A React Element from an older version of React was rendered. ' + 'This is not supported. It can happen if:\n' + '- Multiple copies of the "react" package is used.\n' + '- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n' + '- A compiler tries to "inline" JSX instead of using the runtime.'); + } // $FlowFixMe[method-unbinding] + + var childString = Object.prototype.toString.call(newChild); throw new Error("Objects are not valid as a React child (found: " + (childString === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : childString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.'); } @@ -26463,7 +26468,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-canary-f9159889'; +var ReactVersion = '19.0.0-canary-5d4acc6d'; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol 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 ace87d5eca2c5..a6a98cd998e21 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<<559fea30e60deb383163e9ed4cb86c78>> + * @generated SignedSource<<9fb9d275d91b0770a5e01a5d1b448a6b>> */ "use strict"; @@ -1128,7 +1128,7 @@ var ReactSharedInternals = enableUnifiedSyncLane = dynamicFlagsUntyped.enableUnifiedSyncLane, disableDefaultPropsExceptForClasses = dynamicFlagsUntyped.disableDefaultPropsExceptForClasses, - REACT_ELEMENT_TYPE = Symbol.for("react.element"), + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), @@ -2963,6 +2963,10 @@ function unwrapThenable(thenable) { return trackUsedThenable(thenableState$1, thenable, index); } function throwOnInvalidObjectType(returnFiber, newChild) { + if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE) + throw Error( + 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.' + ); returnFiber = Object.prototype.toString.call(newChild); throw Error( "Objects are not valid as a React child (found: " + @@ -3123,7 +3127,7 @@ function createChildReconciler(shouldTrackSideEffects) { ); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return ( (lanes = createFiberFromTypeAndProps( newChild.type, @@ -3186,7 +3190,7 @@ function createChildReconciler(shouldTrackSideEffects) { : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return newChild.key === key ? updateElement(returnFiber, oldFiber, newChild, lanes) : null; @@ -3240,7 +3244,7 @@ function createChildReconciler(shouldTrackSideEffects) { ); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return ( (existingChildren = existingChildren.get( @@ -3471,7 +3475,7 @@ function createChildReconciler(shouldTrackSideEffects) { (newChild = newChild.props.children); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: a: { for (var key = newChild.key; null !== currentFirstChild; ) { if (currentFirstChild.key === key) { @@ -10824,7 +10828,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1168 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "19.0.0-canary-72179424", + version: "19.0.0-canary-8dcee9a8", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10867,7 +10871,7 @@ var internals$jscomp$inline_1452 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-72179424" + reconcilerVersion: "19.0.0-canary-8dcee9a8" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1453 = __REACT_DEVTOOLS_GLOBAL_HOOK__; 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 f925082c5473c..9fcb58c8c0ff9 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<<677f52c0fc1c027786c2d7914509109d>> + * @generated SignedSource<<43dee07829a8836e41fb24b81dcf0f1c>> */ "use strict"; @@ -1132,7 +1132,7 @@ var ReactSharedInternals = enableUnifiedSyncLane = dynamicFlagsUntyped.enableUnifiedSyncLane, disableDefaultPropsExceptForClasses = dynamicFlagsUntyped.disableDefaultPropsExceptForClasses, - REACT_ELEMENT_TYPE = Symbol.for("react.element"), + REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), @@ -3085,6 +3085,10 @@ function unwrapThenable(thenable) { return trackUsedThenable(thenableState$1, thenable, index); } function throwOnInvalidObjectType(returnFiber, newChild) { + if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE) + throw Error( + 'A React Element from an older version of React was rendered. This is not supported. It can happen if:\n- Multiple copies of the "react" package is used.\n- A library pre-bundled an old copy of "react" or "react/jsx-runtime".\n- A compiler tries to "inline" JSX instead of using the runtime.' + ); returnFiber = Object.prototype.toString.call(newChild); throw Error( "Objects are not valid as a React child (found: " + @@ -3245,7 +3249,7 @@ function createChildReconciler(shouldTrackSideEffects) { ); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return ( (lanes = createFiberFromTypeAndProps( newChild.type, @@ -3308,7 +3312,7 @@ function createChildReconciler(shouldTrackSideEffects) { : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return newChild.key === key ? updateElement(returnFiber, oldFiber, newChild, lanes) : null; @@ -3362,7 +3366,7 @@ function createChildReconciler(shouldTrackSideEffects) { ); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: return ( (existingChildren = existingChildren.get( @@ -3593,7 +3597,7 @@ function createChildReconciler(shouldTrackSideEffects) { (newChild = newChild.props.children); if ("object" === typeof newChild && null !== newChild) { switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: + case REACT_LEGACY_ELEMENT_TYPE: a: { for (var key = newChild.key; null !== currentFirstChild; ) { if (currentFirstChild.key === key) { @@ -11530,7 +11534,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1248 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "19.0.0-canary-d8b54028", + version: "19.0.0-canary-8d3077e0", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -11586,7 +11590,7 @@ var roots = new Map(), scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-d8b54028" + reconcilerVersion: "19.0.0-canary-8d3077e0" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { computeComponentStackForErrorReporting: function (reactTag) {