Skip to content

Commit

Permalink
Update React from 1df34bdf62 to 20b6f4c0e8
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jun 10, 2024
1 parent d7d5117 commit 27692f0
Show file tree
Hide file tree
Showing 108 changed files with 5,810 additions and 2,854 deletions.
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,18 +197,18 @@
"pretty-bytes": "5.3.0",
"pretty-ms": "7.0.0",
"random-seed": "0.3.0",
"react": "19.0.0-rc-1df34bdf62-20240605",
"react": "19.0.0-rc-20b6f4c0e8-20240607",
"react-17": "npm:[email protected]",
"react-builtin": "npm:[email protected]1df34bdf62-20240605",
"react-dom": "19.0.0-rc-1df34bdf62-20240605",
"react-builtin": "npm:[email protected]20b6f4c0e8-20240607",
"react-dom": "19.0.0-rc-20b6f4c0e8-20240607",
"react-dom-17": "npm:[email protected]",
"react-dom-builtin": "npm:[email protected]1df34bdf62-20240605",
"react-dom-experimental-builtin": "npm:[email protected]1df34bdf62-20240605",
"react-experimental-builtin": "npm:[email protected]1df34bdf62-20240605",
"react-server-dom-turbopack": "19.0.0-rc-1df34bdf62-20240605",
"react-server-dom-turbopack-experimental": "npm:[email protected]1df34bdf62-20240605",
"react-server-dom-webpack": "19.0.0-rc-1df34bdf62-20240605",
"react-server-dom-webpack-experimental": "npm:[email protected]1df34bdf62-20240605",
"react-dom-builtin": "npm:[email protected]20b6f4c0e8-20240607",
"react-dom-experimental-builtin": "npm:[email protected]20b6f4c0e8-20240607",
"react-experimental-builtin": "npm:[email protected]20b6f4c0e8-20240607",
"react-server-dom-turbopack": "19.0.0-rc-20b6f4c0e8-20240607",
"react-server-dom-turbopack-experimental": "npm:[email protected]20b6f4c0e8-20240607",
"react-server-dom-webpack": "19.0.0-rc-20b6f4c0e8-20240607",
"react-server-dom-webpack-experimental": "npm:[email protected]20b6f4c0e8-20240607",
"react-ssr-prepass": "1.0.8",
"react-virtualized": "9.22.3",
"relay-compiler": "13.0.2",
Expand All @@ -218,8 +218,8 @@
"resolve-from": "5.0.0",
"sass": "1.54.0",
"satori": "0.10.9",
"scheduler-builtin": "npm:[email protected]1df34bdf62-20240605",
"scheduler-experimental-builtin": "npm:[email protected]1df34bdf62-20240605",
"scheduler-builtin": "npm:[email protected]20b6f4c0e8-20240607",
"scheduler-experimental-builtin": "npm:[email protected]20b6f4c0e8-20240607",
"seedrandom": "3.0.5",
"semver": "7.3.7",
"shell-quote": "1.7.3",
Expand Down Expand Up @@ -253,10 +253,10 @@
"@babel/traverse": "7.22.5",
"@types/react": "npm:[email protected]",
"@types/react-dom": "npm:[email protected]",
"react": "19.0.0-rc-1df34bdf62-20240605",
"react-dom": "19.0.0-rc-1df34bdf62-20240605",
"react-is": "19.0.0-rc-1df34bdf62-20240605",
"scheduler": "0.25.0-rc-1df34bdf62-20240605"
"react": "19.0.0-rc-20b6f4c0e8-20240607",
"react-dom": "19.0.0-rc-20b6f4c0e8-20240607",
"react-is": "19.0.0-rc-20b6f4c0e8-20240607",
"scheduler": "0.25.0-rc-20b6f4c0e8-20240607"
},
"engines": {
"node": ">=18.17.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11535,7 +11535,7 @@ var ownerHasKeyUseWarning;
var ownerHasFunctionTypeWarning;
var ownerHasSymbolTypeWarning;

var warnForMissingKey = function (child, returnFiber) {};
var warnForMissingKey = function (returnFiber, workInProgress, child) {};

{
didWarnAboutMaps = false;
Expand All @@ -11550,7 +11550,7 @@ var warnForMissingKey = function (child, returnFiber) {};
ownerHasFunctionTypeWarning = {};
ownerHasSymbolTypeWarning = {};

warnForMissingKey = function (child, returnFiber) {
warnForMissingKey = function (returnFiber, workInProgress, child) {
if (child === null || typeof child !== 'object') {
return;
}
Expand Down Expand Up @@ -11609,15 +11609,9 @@ var warnForMissingKey = function (child, returnFiber) {};
// Give the component that originally created this child.
childOwnerAppendix = " It was passed a child from " + ownerName + ".";
}
} // We create a fake Fiber for the child to log the stack trace from.
// TODO: Refactor the warnForMissingKey calls to happen after fiber creation
// so that we can get access to the fiber that will eventually be created.
// That way the log can show up associated with the right instance in DevTools.

}

var fiber = createFiberFromElement(child, returnFiber.mode, 0);
fiber.return = returnFiber;
runWithFiberInDEV(fiber, function () {
runWithFiberInDEV(workInProgress, function () {
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://react.dev/link/warning-keys for more information.', currentComponentErrorInfo, childOwnerAppendix);
});
};
Expand Down Expand Up @@ -12214,7 +12208,7 @@ function createChildReconciler(shouldTrackSideEffects) {
*/


function warnOnInvalidKey(child, knownKeys, returnFiber) {
function warnOnInvalidKey(returnFiber, workInProgress, child, knownKeys) {
{
if (typeof child !== 'object' || child === null) {
return knownKeys;
Expand All @@ -12223,7 +12217,7 @@ function createChildReconciler(shouldTrackSideEffects) {
switch (child.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
warnForMissingKey(child, returnFiber);
warnForMissingKey(returnFiber, workInProgress, child);
var key = child.key;

if (typeof key !== 'string') {
Expand All @@ -12241,8 +12235,9 @@ function createChildReconciler(shouldTrackSideEffects) {
break;
}

error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);

runWithFiberInDEV(workInProgress, function () {
error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);
});
break;

case REACT_LAZY_TYPE:
Expand All @@ -12253,7 +12248,7 @@ function createChildReconciler(shouldTrackSideEffects) {
resolvedChild = callLazyInitInDEV(child);
}

warnOnInvalidKey(resolvedChild, knownKeys, returnFiber);
warnOnInvalidKey(returnFiber, workInProgress, resolvedChild, knownKeys);
break;
}
}
Expand All @@ -12278,16 +12273,7 @@ function createChildReconciler(shouldTrackSideEffects) {
// (adding everything to a Map) in for every insert/move.
// If you change this code, also update reconcileChildrenIterator() which
// uses the same algorithm.
{
// First, validate keys.
var knownKeys = null;

for (var i = 0; i < newChildren.length; i++) {
var child = newChildren[i];
knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
}
}

var knownKeys = null;
var resultingFirstChild = null;
var previousNewFiber = null;
var oldFiber = currentFirstChild;
Expand Down Expand Up @@ -12317,6 +12303,10 @@ function createChildReconciler(shouldTrackSideEffects) {
break;
}

{
knownKeys = warnOnInvalidKey(returnFiber, newFiber, newChildren[newIdx], knownKeys);
}

if (shouldTrackSideEffects) {
if (oldFiber && newFiber.alternate === null) {
// We matched the slot, but we didn't reuse the existing fiber, so we
Expand Down Expand Up @@ -12364,6 +12354,10 @@ function createChildReconciler(shouldTrackSideEffects) {
continue;
}

{
knownKeys = warnOnInvalidKey(returnFiber, _newFiber, newChildren[newIdx], knownKeys);
}

lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);

if (previousNewFiber === null) {
Expand Down Expand Up @@ -12391,6 +12385,10 @@ function createChildReconciler(shouldTrackSideEffects) {
var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes, debugInfo);

if (_newFiber2 !== null) {
{
knownKeys = warnOnInvalidKey(returnFiber, _newFiber2, newChildren[newIdx], knownKeys);
}

if (shouldTrackSideEffects) {
if (_newFiber2.alternate !== null) {
// The new fiber is a work in progress, but if there exists a
Expand Down Expand Up @@ -12522,11 +12520,7 @@ function createChildReconciler(shouldTrackSideEffects) {
var knownKeys = null;
var step = newChildren.next();

{
knownKeys = warnOnInvalidKey(step.value, knownKeys, returnFiber);
}

for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next(), knownKeys = warnOnInvalidKey(step.value, knownKeys, returnFiber) ) {
for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {
if (oldFiber.index > newIdx) {
nextOldFiber = oldFiber;
oldFiber = null;
Expand All @@ -12548,6 +12542,10 @@ function createChildReconciler(shouldTrackSideEffects) {
break;
}

{
knownKeys = warnOnInvalidKey(returnFiber, newFiber, step.value, knownKeys);
}

if (shouldTrackSideEffects) {
if (oldFiber && newFiber.alternate === null) {
// We matched the slot, but we didn't reuse the existing fiber, so we
Expand Down Expand Up @@ -12588,13 +12586,17 @@ function createChildReconciler(shouldTrackSideEffects) {
if (oldFiber === null) {
// If we don't have any more existing children we can choose a fast path
// since the rest will all be insertions.
for (; !step.done; newIdx++, step = newChildren.next(), knownKeys = warnOnInvalidKey(step.value, knownKeys, returnFiber) ) {
for (; !step.done; newIdx++, step = newChildren.next()) {
var _newFiber3 = createChild(returnFiber, step.value, lanes, debugInfo);

if (_newFiber3 === null) {
continue;
}

{
knownKeys = warnOnInvalidKey(returnFiber, _newFiber3, step.value, knownKeys);
}

lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);

if (previousNewFiber === null) {
Expand All @@ -12618,10 +12620,14 @@ function createChildReconciler(shouldTrackSideEffects) {

var existingChildren = mapRemainingChildren(oldFiber); // Keep scanning and use the map to restore deleted items as moves.

for (; !step.done; newIdx++, step = newChildren.next(), knownKeys = warnOnInvalidKey(step.value, knownKeys, returnFiber) ) {
for (; !step.done; newIdx++, step = newChildren.next()) {
var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes, debugInfo);

if (_newFiber4 !== null) {
{
knownKeys = warnOnInvalidKey(returnFiber, _newFiber4, step.value, knownKeys);
}

if (shouldTrackSideEffects) {
if (_newFiber4.alternate !== null) {
// The new fiber is a work in progress, but if there exists a
Expand Down Expand Up @@ -35848,8 +35854,25 @@ function getResource(type, currentProps, pendingProps, currentResource) {

_styles.set(_key, _resource);

var instance = ownerDocument.querySelector(getStylesheetSelectorFromKey(_key));

if (instance) {
var loadingState = instance._p;

if (loadingState) ; else {
// This instance is already loaded
_resource.instance = instance;
_resource.state.loading = Loaded | Inserted;
}
}

if (!preloadPropsMap.has(_key)) {
preloadStylesheet(ownerDocument, _key, preloadPropsFromStylesheet(qualifiedProps), _resource.state);
var preloadProps = preloadPropsFromStylesheet(qualifiedProps);
preloadPropsMap.set(_key, preloadProps);

if (!instance) {
preloadStylesheet(ownerDocument, _key, preloadProps, _resource.state);
}
}
}

Expand Down Expand Up @@ -35996,31 +36019,24 @@ function stylesheetPropsFromRawProps(rawProps) {
}

function preloadStylesheet(ownerDocument, key, preloadProps, state) {
preloadPropsMap.set(key, preloadProps);

if (!ownerDocument.querySelector(getStylesheetSelectorFromKey(key))) {
// There is no matching stylesheet instance in the Document.
// We will insert a preload now to kick off loading because
// we expect this stylesheet to commit
var preloadEl = ownerDocument.querySelector(getPreloadStylesheetSelectorFromKey(key));

if (preloadEl) {
// If we find a preload already it was SSR'd and we won't have an actual
// loading state to track. For now we will just assume it is loaded
state.loading = Loaded;
} else {
var instance = ownerDocument.createElement('link');
state.preload = instance;
instance.addEventListener('load', function () {
return state.loading |= Loaded;
});
instance.addEventListener('error', function () {
return state.loading |= Errored;
});
setInitialProperties(instance, 'link', preloadProps);
markNodeAsHoistable(instance);
ownerDocument.head.appendChild(instance);
}
var preloadEl = ownerDocument.querySelector(getPreloadStylesheetSelectorFromKey(key));

if (preloadEl) {
// If we find a preload already it was SSR'd and we won't have an actual
// loading state to track. For now we will just assume it is loaded
state.loading = Loaded;
} else {
var instance = ownerDocument.createElement('link');
state.preload = instance;
instance.addEventListener('load', function () {
return state.loading |= Loaded;
});
instance.addEventListener('error', function () {
return state.loading |= Errored;
});
setInitialProperties(instance, 'link', preloadProps);
markNodeAsHoistable(instance);
ownerDocument.head.appendChild(instance);
}
}

Expand Down Expand Up @@ -36888,7 +36904,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
return root;
}

var ReactVersion = '19.0.0-experimental-1df34bdf62-20240605';
var ReactVersion = '19.0.0-experimental-20b6f4c0e8-20240607';

// Might add PROFILE later.

Expand Down
Loading

0 comments on commit 27692f0

Please sign in to comment.