forked from expo/expo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(cli): bump canary to support React 19 beta (expo#28592)
# Why Support React 19 beta with the following resolutions: ```json { "@types/react": "18.3.1", "@types/react-dom": "18.3.0", "react": "19.0.0-beta-4508873393-20240430", "react-dom": "19.0.0-beta-4508873393-20240430" } ``` ## Test Plan - ~~Web works as expected but requires a minor change in Router, will follow up in another PR.~~ landing fix in this PR to keep CI green. - ~~Native only appears to work with fabric enabled. Setting `disableLegacyMode = false` and trying again.~~ `disableLegacyMode = false` works with legacy arch, e.g. Expo Go. --------- Co-authored-by: Expo Bot <[email protected]>
- Loading branch information
Showing
23 changed files
with
76,756 additions
and
61,072 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
200 changes: 200 additions & 0 deletions
200
packages/@expo/cli/static/canary/react-is/cjs/react-is.development.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,200 @@ | ||
/** | ||
* @license React | ||
* react-is.development.js | ||
* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
if (process.env.NODE_ENV !== "production") { | ||
(function() { | ||
'use strict'; | ||
|
||
// ----------------------------------------------------------------------------- | ||
|
||
var enableScopeAPI = false; // Experimental Create Event Handle API. | ||
var enableTransitionTracing = false; // No known bugs, but needs performance testing | ||
|
||
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber | ||
|
||
var enableRenderableContext = true; // Enables the `initialValue` option for `useDeferredValue` | ||
// stuff. Intended to enable React core members to more easily debug scheduling | ||
// issues in DEV builds. | ||
|
||
var enableDebugTracing = false; | ||
|
||
var REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element') ; | ||
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'); | ||
var REACT_PROFILER_TYPE = Symbol.for('react.profiler'); | ||
var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); // TODO: Delete with enableRenderableContext | ||
|
||
var REACT_CONSUMER_TYPE = Symbol.for('react.consumer'); | ||
var REACT_CONTEXT_TYPE = Symbol.for('react.context'); | ||
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'); | ||
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense'); | ||
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list'); | ||
var REACT_MEMO_TYPE = Symbol.for('react.memo'); | ||
var REACT_LAZY_TYPE = Symbol.for('react.lazy'); | ||
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen'); | ||
|
||
var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference'); | ||
function isValidElementType(type) { | ||
if (typeof type === 'string' || typeof type === 'function') { | ||
return true; | ||
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). | ||
|
||
|
||
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableTransitionTracing ) { | ||
return true; | ||
} | ||
|
||
if (typeof type === 'object' && type !== null) { | ||
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || !enableRenderableContext || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object | ||
// types supported by any Flight configuration anywhere since | ||
// we don't know which Flight build this will end up being used | ||
// with. | ||
type.$$typeof === REACT_CLIENT_REFERENCE || type.getModuleId !== undefined) { | ||
return true; | ||
} | ||
} | ||
|
||
return false; | ||
} | ||
|
||
function typeOf(object) { | ||
if (typeof object === 'object' && object !== null) { | ||
var $$typeof = object.$$typeof; | ||
|
||
switch ($$typeof) { | ||
case REACT_ELEMENT_TYPE: | ||
var type = object.type; | ||
|
||
switch (type) { | ||
case REACT_FRAGMENT_TYPE: | ||
case REACT_PROFILER_TYPE: | ||
case REACT_STRICT_MODE_TYPE: | ||
case REACT_SUSPENSE_TYPE: | ||
case REACT_SUSPENSE_LIST_TYPE: | ||
return type; | ||
|
||
default: | ||
var $$typeofType = type && type.$$typeof; | ||
|
||
switch ($$typeofType) { | ||
case REACT_CONTEXT_TYPE: | ||
case REACT_FORWARD_REF_TYPE: | ||
case REACT_LAZY_TYPE: | ||
case REACT_MEMO_TYPE: | ||
return $$typeofType; | ||
|
||
case REACT_CONSUMER_TYPE: | ||
{ | ||
return $$typeofType; | ||
} | ||
|
||
// Fall through | ||
|
||
case REACT_PROVIDER_TYPE: | ||
|
||
// Fall through | ||
|
||
default: | ||
return $$typeof; | ||
} | ||
|
||
} | ||
|
||
case REACT_PORTAL_TYPE: | ||
return $$typeof; | ||
} | ||
} | ||
|
||
return undefined; | ||
} | ||
var ContextConsumer = REACT_CONSUMER_TYPE ; | ||
var ContextProvider = REACT_CONTEXT_TYPE ; | ||
var Element = REACT_ELEMENT_TYPE; | ||
var ForwardRef = REACT_FORWARD_REF_TYPE; | ||
var Fragment = REACT_FRAGMENT_TYPE; | ||
var Lazy = REACT_LAZY_TYPE; | ||
var Memo = REACT_MEMO_TYPE; | ||
var Portal = REACT_PORTAL_TYPE; | ||
var Profiler = REACT_PROFILER_TYPE; | ||
var StrictMode = REACT_STRICT_MODE_TYPE; | ||
var Suspense = REACT_SUSPENSE_TYPE; | ||
var SuspenseList = REACT_SUSPENSE_LIST_TYPE; | ||
function isContextConsumer(object) { | ||
{ | ||
return typeOf(object) === REACT_CONSUMER_TYPE; | ||
} | ||
} | ||
function isContextProvider(object) { | ||
{ | ||
return typeOf(object) === REACT_CONTEXT_TYPE; | ||
} | ||
} | ||
function isElement(object) { | ||
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | ||
} | ||
function isForwardRef(object) { | ||
return typeOf(object) === REACT_FORWARD_REF_TYPE; | ||
} | ||
function isFragment(object) { | ||
return typeOf(object) === REACT_FRAGMENT_TYPE; | ||
} | ||
function isLazy(object) { | ||
return typeOf(object) === REACT_LAZY_TYPE; | ||
} | ||
function isMemo(object) { | ||
return typeOf(object) === REACT_MEMO_TYPE; | ||
} | ||
function isPortal(object) { | ||
return typeOf(object) === REACT_PORTAL_TYPE; | ||
} | ||
function isProfiler(object) { | ||
return typeOf(object) === REACT_PROFILER_TYPE; | ||
} | ||
function isStrictMode(object) { | ||
return typeOf(object) === REACT_STRICT_MODE_TYPE; | ||
} | ||
function isSuspense(object) { | ||
return typeOf(object) === REACT_SUSPENSE_TYPE; | ||
} | ||
function isSuspenseList(object) { | ||
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE; | ||
} | ||
|
||
exports.ContextConsumer = ContextConsumer; | ||
exports.ContextProvider = ContextProvider; | ||
exports.Element = Element; | ||
exports.ForwardRef = ForwardRef; | ||
exports.Fragment = Fragment; | ||
exports.Lazy = Lazy; | ||
exports.Memo = Memo; | ||
exports.Portal = Portal; | ||
exports.Profiler = Profiler; | ||
exports.StrictMode = StrictMode; | ||
exports.Suspense = Suspense; | ||
exports.SuspenseList = SuspenseList; | ||
exports.isContextConsumer = isContextConsumer; | ||
exports.isContextProvider = isContextProvider; | ||
exports.isElement = isElement; | ||
exports.isForwardRef = isForwardRef; | ||
exports.isFragment = isFragment; | ||
exports.isLazy = isLazy; | ||
exports.isMemo = isMemo; | ||
exports.isPortal = isPortal; | ||
exports.isProfiler = isProfiler; | ||
exports.isStrictMode = isStrictMode; | ||
exports.isSuspense = isSuspense; | ||
exports.isSuspenseList = isSuspenseList; | ||
exports.isValidElementType = isValidElementType; | ||
exports.typeOf = typeOf; | ||
})(); | ||
} |
130 changes: 130 additions & 0 deletions
130
packages/@expo/cli/static/canary/react-is/cjs/react-is.production.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
/** | ||
* @license React | ||
* react-is.production.js | ||
* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
"use strict"; | ||
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), | ||
REACT_PORTAL_TYPE = Symbol.for("react.portal"), | ||
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), | ||
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), | ||
REACT_PROFILER_TYPE = Symbol.for("react.profiler"); | ||
Symbol.for("react.provider"); | ||
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), | ||
REACT_CONTEXT_TYPE = Symbol.for("react.context"), | ||
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), | ||
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), | ||
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), | ||
REACT_MEMO_TYPE = Symbol.for("react.memo"), | ||
REACT_LAZY_TYPE = Symbol.for("react.lazy"), | ||
REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), | ||
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: | ||
switch (((object = object.type), object)) { | ||
case REACT_FRAGMENT_TYPE: | ||
case REACT_PROFILER_TYPE: | ||
case REACT_STRICT_MODE_TYPE: | ||
case REACT_SUSPENSE_TYPE: | ||
case REACT_SUSPENSE_LIST_TYPE: | ||
return object; | ||
default: | ||
switch (((object = object && object.$$typeof), object)) { | ||
case REACT_CONTEXT_TYPE: | ||
case REACT_FORWARD_REF_TYPE: | ||
case REACT_LAZY_TYPE: | ||
case REACT_MEMO_TYPE: | ||
return object; | ||
case REACT_CONSUMER_TYPE: | ||
return object; | ||
default: | ||
return $$typeof; | ||
} | ||
} | ||
case REACT_PORTAL_TYPE: | ||
return $$typeof; | ||
} | ||
} | ||
} | ||
exports.ContextConsumer = REACT_CONSUMER_TYPE; | ||
exports.ContextProvider = REACT_CONTEXT_TYPE; | ||
exports.Element = REACT_ELEMENT_TYPE; | ||
exports.ForwardRef = REACT_FORWARD_REF_TYPE; | ||
exports.Fragment = REACT_FRAGMENT_TYPE; | ||
exports.Lazy = REACT_LAZY_TYPE; | ||
exports.Memo = REACT_MEMO_TYPE; | ||
exports.Portal = REACT_PORTAL_TYPE; | ||
exports.Profiler = REACT_PROFILER_TYPE; | ||
exports.StrictMode = REACT_STRICT_MODE_TYPE; | ||
exports.Suspense = REACT_SUSPENSE_TYPE; | ||
exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE; | ||
exports.isContextConsumer = function (object) { | ||
return typeOf(object) === REACT_CONSUMER_TYPE; | ||
}; | ||
exports.isContextProvider = function (object) { | ||
return typeOf(object) === REACT_CONTEXT_TYPE; | ||
}; | ||
exports.isElement = function (object) { | ||
return ( | ||
"object" === typeof object && | ||
null !== object && | ||
object.$$typeof === REACT_ELEMENT_TYPE | ||
); | ||
}; | ||
exports.isForwardRef = function (object) { | ||
return typeOf(object) === REACT_FORWARD_REF_TYPE; | ||
}; | ||
exports.isFragment = function (object) { | ||
return typeOf(object) === REACT_FRAGMENT_TYPE; | ||
}; | ||
exports.isLazy = function (object) { | ||
return typeOf(object) === REACT_LAZY_TYPE; | ||
}; | ||
exports.isMemo = function (object) { | ||
return typeOf(object) === REACT_MEMO_TYPE; | ||
}; | ||
exports.isPortal = function (object) { | ||
return typeOf(object) === REACT_PORTAL_TYPE; | ||
}; | ||
exports.isProfiler = function (object) { | ||
return typeOf(object) === REACT_PROFILER_TYPE; | ||
}; | ||
exports.isStrictMode = function (object) { | ||
return typeOf(object) === REACT_STRICT_MODE_TYPE; | ||
}; | ||
exports.isSuspense = function (object) { | ||
return typeOf(object) === REACT_SUSPENSE_TYPE; | ||
}; | ||
exports.isSuspenseList = function (object) { | ||
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE; | ||
}; | ||
exports.isValidElementType = function (type) { | ||
return "string" === typeof type || | ||
"function" === typeof type || | ||
type === REACT_FRAGMENT_TYPE || | ||
type === REACT_PROFILER_TYPE || | ||
type === REACT_STRICT_MODE_TYPE || | ||
type === REACT_SUSPENSE_TYPE || | ||
type === REACT_SUSPENSE_LIST_TYPE || | ||
type === REACT_OFFSCREEN_TYPE || | ||
("object" === typeof type && | ||
null !== type && | ||
(type.$$typeof === REACT_LAZY_TYPE || | ||
type.$$typeof === REACT_MEMO_TYPE || | ||
type.$$typeof === REACT_CONTEXT_TYPE || | ||
type.$$typeof === REACT_CONSUMER_TYPE || | ||
type.$$typeof === REACT_FORWARD_REF_TYPE || | ||
type.$$typeof === REACT_CLIENT_REFERENCE || | ||
void 0 !== type.getModuleId)) | ||
? !0 | ||
: !1; | ||
}; | ||
exports.typeOf = typeOf; |
Oops, something went wrong.