From dcbd30caf5b7c811f85275620c2622ce4e59aa67 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Tue, 16 Jul 2024 19:53:59 +0200 Subject: [PATCH] Update React from dfd30974ab to 01172397 --- .github/.react-version | 2 +- examples/reproduction-template/package.json | 4 +- package.json | 34 +- packages/create-next-app/templates/index.ts | 4 +- packages/next/package.json | 4 +- .../cjs/react-dom-client.development.js | 6033 ++++++++-------- .../cjs/react-dom-client.production.js | 472 +- .../cjs/react-dom-profiling.development.js | 6067 +++++++++-------- .../cjs/react-dom-profiling.profiling.js | 458 +- ...t-dom-server-legacy.browser.development.js | 1872 ++--- ...ct-dom-server-legacy.browser.production.js | 1076 +-- ...eact-dom-server-legacy.node.development.js | 1872 ++--- ...react-dom-server-legacy.node.production.js | 1074 +-- .../react-dom-server.browser.development.js | 1911 +++--- .../react-dom-server.browser.production.js | 1062 +-- .../cjs/react-dom-server.bun.production.js | 1060 +-- .../cjs/react-dom-server.edge.development.js | 1911 +++--- .../cjs/react-dom-server.edge.production.js | 1060 +-- .../cjs/react-dom-server.node.development.js | 1915 +++--- .../cjs/react-dom-server.node.production.js | 1060 +-- .../react-dom-unstable_testing.development.js | 6033 ++++++++-------- .../react-dom-unstable_testing.production.js | 472 +- .../cjs/react-dom.development.js | 62 +- .../cjs/react-dom.production.js | 7 +- .../cjs/react-dom.react-server.development.js | 60 +- .../cjs/react-dom.react-server.production.js | 14 +- .../react-dom-experimental/package.json | 4 +- .../cjs/react-dom-client.development.js | 5887 ++++++++-------- .../cjs/react-dom-client.production.js | 472 +- .../cjs/react-dom-profiling.development.js | 5921 ++++++++-------- .../cjs/react-dom-profiling.profiling.js | 458 +- ...t-dom-server-legacy.browser.development.js | 1414 ++-- ...ct-dom-server-legacy.browser.production.js | 973 +-- ...eact-dom-server-legacy.node.development.js | 1414 ++-- ...react-dom-server-legacy.node.production.js | 971 +-- .../react-dom-server.browser.development.js | 1442 ++-- .../react-dom-server.browser.production.js | 961 +-- .../cjs/react-dom-server.bun.production.js | 957 +-- .../cjs/react-dom-server.edge.development.js | 1442 ++-- .../cjs/react-dom-server.edge.production.js | 959 +-- .../cjs/react-dom-server.node.development.js | 1445 ++-- .../cjs/react-dom-server.node.production.js | 959 +-- .../react-dom/cjs/react-dom.development.js | 60 +- .../react-dom/cjs/react-dom.production.js | 7 +- .../cjs/react-dom.react-server.development.js | 90 +- .../cjs/react-dom.react-server.production.js | 14 +- .../next/src/compiled/react-dom/package.json | 4 +- .../cjs/react-compiler-runtime.development.js | 23 +- .../cjs/react-jsx-dev-runtime.development.js | 174 +- ...sx-dev-runtime.react-server.development.js | 176 +- .../cjs/react-jsx-runtime.development.js | 174 +- ...ct-jsx-runtime.react-server.development.js | 176 +- .../cjs/react.development.js | 205 +- .../cjs/react.production.js | 5 +- .../cjs/react.react-server.development.js | 155 +- .../cjs/react.react-server.production.js | 5 +- .../next/src/compiled/react-is/package.json | 2 +- ...om-turbopack-client.browser.development.js | 228 +- ...dom-turbopack-client.browser.production.js | 82 +- ...r-dom-turbopack-client.edge.development.js | 230 +- ...er-dom-turbopack-client.edge.production.js | 82 +- ...r-dom-turbopack-client.node.development.js | 230 +- ...er-dom-turbopack-client.node.production.js | 82 +- ...opack-client.node.unbundled.development.js | 230 +- ...bopack-client.node.unbundled.production.js | 82 +- ...om-turbopack-server.browser.development.js | 879 +-- ...dom-turbopack-server.browser.production.js | 166 +- ...r-dom-turbopack-server.edge.development.js | 909 +-- ...er-dom-turbopack-server.edge.production.js | 166 +- ...r-dom-turbopack-server.node.development.js | 919 +-- ...er-dom-turbopack-server.node.production.js | 184 +- ...opack-server.node.unbundled.development.js | 919 +-- ...bopack-server.node.unbundled.production.js | 184 +- .../package.json | 4 +- ...om-turbopack-client.browser.development.js | 215 +- ...dom-turbopack-client.browser.production.js | 70 +- ...r-dom-turbopack-client.edge.development.js | 217 +- ...er-dom-turbopack-client.edge.production.js | 70 +- ...r-dom-turbopack-client.node.development.js | 217 +- ...er-dom-turbopack-client.node.production.js | 70 +- ...opack-client.node.unbundled.development.js | 217 +- ...bopack-client.node.unbundled.production.js | 70 +- ...om-turbopack-server.browser.development.js | 668 +- ...dom-turbopack-server.browser.production.js | 136 +- ...r-dom-turbopack-server.edge.development.js | 680 +- ...er-dom-turbopack-server.edge.production.js | 136 +- ...r-dom-turbopack-server.node.development.js | 688 +- ...er-dom-turbopack-server.node.production.js | 154 +- ...opack-server.node.unbundled.development.js | 688 +- ...bopack-server.node.unbundled.production.js | 154 +- .../react-server-dom-turbopack/package.json | 4 +- ...-dom-webpack-client.browser.development.js | 228 +- ...r-dom-webpack-client.browser.production.js | 82 +- ...ver-dom-webpack-client.edge.development.js | 230 +- ...rver-dom-webpack-client.edge.production.js | 82 +- ...ver-dom-webpack-client.node.development.js | 399 +- ...rver-dom-webpack-client.node.production.js | 259 +- ...bpack-client.node.unbundled.development.js | 399 +- ...ebpack-client.node.unbundled.production.js | 259 +- ...-dom-webpack-server.browser.development.js | 881 +-- ...r-dom-webpack-server.browser.production.js | 166 +- ...ver-dom-webpack-server.edge.development.js | 911 +-- ...rver-dom-webpack-server.edge.production.js | 166 +- ...ver-dom-webpack-server.node.development.js | 921 +-- ...rver-dom-webpack-server.node.production.js | 184 +- ...bpack-server.node.unbundled.development.js | 921 +-- ...ebpack-server.node.unbundled.production.js | 184 +- .../package.json | 4 +- ...-dom-webpack-client.browser.development.js | 215 +- ...r-dom-webpack-client.browser.production.js | 70 +- ...ver-dom-webpack-client.edge.development.js | 217 +- ...rver-dom-webpack-client.edge.production.js | 70 +- ...ver-dom-webpack-client.node.development.js | 400 +- ...rver-dom-webpack-client.node.production.js | 255 +- ...bpack-client.node.unbundled.development.js | 400 +- ...ebpack-client.node.unbundled.production.js | 255 +- ...-dom-webpack-server.browser.development.js | 670 +- ...r-dom-webpack-server.browser.production.js | 136 +- ...ver-dom-webpack-server.edge.development.js | 682 +- ...rver-dom-webpack-server.edge.production.js | 136 +- ...ver-dom-webpack-server.node.development.js | 690 +- ...rver-dom-webpack-server.node.production.js | 154 +- ...bpack-server.node.unbundled.development.js | 690 +- ...ebpack-server.node.unbundled.production.js | 154 +- .../react-server-dom-webpack/package.json | 4 +- .../cjs/react-compiler-runtime.development.js | 19 +- .../cjs/react-jsx-dev-runtime.development.js | 72 +- ...sx-dev-runtime.react-server.development.js | 74 +- .../cjs/react-jsx-runtime.development.js | 72 +- ...ct-jsx-runtime.react-server.development.js | 74 +- .../compiled/react/cjs/react.development.js | 162 +- .../compiled/react/cjs/react.production.js | 2 +- .../cjs/react.react-server.development.js | 108 +- .../cjs/react.react-server.production.js | 2 +- .../next/src/compiled/unistore/unistore.js | 2 +- pnpm-lock.yaml | 347 +- run-tests.js | 2 +- test/.stats-app/package.json | 4 +- .../first-time-setup-js/package.json | 4 +- .../first-time-setup-ts/package.json | 4 +- test/lib/next-modes/base.ts | 2 +- 141 files changed, 44691 insertions(+), 40311 deletions(-) diff --git a/.github/.react-version b/.github/.react-version index 2818c978d4b77..2aef871443327 100644 --- a/.github/.react-version +++ b/.github/.react-version @@ -1 +1 @@ -19.0.0-rc-dfd30974ab-20240613 \ No newline at end of file +19.0.0-rc-01172397-20240716 \ No newline at end of file diff --git a/examples/reproduction-template/package.json b/examples/reproduction-template/package.json index 42c43bfdaf725..47823f48b4fca 100644 --- a/examples/reproduction-template/package.json +++ b/examples/reproduction-template/package.json @@ -7,8 +7,8 @@ }, "dependencies": { "next": "canary", - "react": "19.0.0-rc-dfd30974ab-20240613", - "react-dom": "19.0.0-rc-dfd30974ab-20240613" + "react": "19.0.0-rc-01172397-20240716", + "react-dom": "19.0.0-rc-01172397-20240716" }, "devDependencies": { "@types/node": "20.12.12", diff --git a/package.json b/package.json index 6546d17d7f829..d32678116ecc1 100644 --- a/package.json +++ b/package.json @@ -200,19 +200,19 @@ "pretty-bytes": "5.3.0", "pretty-ms": "7.0.0", "random-seed": "0.3.0", - "react": "19.0.0-rc-dfd30974ab-20240613", + "react": "19.0.0-rc-01172397-20240716", "react-17": "npm:react@17.0.2", - "react-builtin": "npm:react@19.0.0-rc-dfd30974ab-20240613", - "react-dom": "19.0.0-rc-dfd30974ab-20240613", + "react-builtin": "npm:react@19.0.0-rc-01172397-20240716", + "react-dom": "19.0.0-rc-01172397-20240716", "react-dom-17": "npm:react-dom@17.0.2", - "react-dom-builtin": "npm:react-dom@19.0.0-rc-dfd30974ab-20240613", - "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-dfd30974ab-20240613", - "react-experimental-builtin": "npm:react@0.0.0-experimental-dfd30974ab-20240613", - "react-is-builtin": "npm:react-is@19.0.0-rc-dfd30974ab-20240613", - "react-server-dom-turbopack": "19.0.0-rc-dfd30974ab-20240613", - "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-dfd30974ab-20240613", - "react-server-dom-webpack": "19.0.0-rc-dfd30974ab-20240613", - "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-dfd30974ab-20240613", + "react-dom-builtin": "npm:react-dom@19.0.0-rc-01172397-20240716", + "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-01172397-20240716", + "react-experimental-builtin": "npm:react@0.0.0-experimental-01172397-20240716", + "react-is-builtin": "npm:react-is@19.0.0-rc-01172397-20240716", + "react-server-dom-turbopack": "19.0.0-rc-01172397-20240716", + "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-01172397-20240716", + "react-server-dom-webpack": "19.0.0-rc-01172397-20240716", + "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-01172397-20240716", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", @@ -222,8 +222,8 @@ "resolve-from": "5.0.0", "sass": "1.54.0", "satori": "0.10.9", - "scheduler-builtin": "npm:scheduler@0.25.0-rc-dfd30974ab-20240613", - "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-dfd30974ab-20240613", + "scheduler-builtin": "npm:scheduler@0.25.0-rc-01172397-20240716", + "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-01172397-20240716", "seedrandom": "3.0.5", "semver": "7.3.7", "shell-quote": "1.7.3", @@ -257,10 +257,10 @@ "@babel/traverse": "7.22.5", "@types/react": "npm:types-react@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", - "react": "19.0.0-rc-dfd30974ab-20240613", - "react-dom": "19.0.0-rc-dfd30974ab-20240613", - "react-is": "19.0.0-rc-dfd30974ab-20240613", - "scheduler": "0.25.0-rc-dfd30974ab-20240613" + "react": "19.0.0-rc-01172397-20240716", + "react-dom": "19.0.0-rc-01172397-20240716", + "react-is": "19.0.0-rc-01172397-20240716", + "scheduler": "0.25.0-rc-01172397-20240716" }, "engines": { "node": ">=18.18.0", diff --git a/packages/create-next-app/templates/index.ts b/packages/create-next-app/templates/index.ts index 7523e1050f903..51590dfcc9ebd 100644 --- a/packages/create-next-app/templates/index.ts +++ b/packages/create-next-app/templates/index.ts @@ -184,8 +184,8 @@ export const installTemplate = async ({ * Default dependencies. */ dependencies: { - react: "19.0.0-rc-dfd30974ab-20240613", - "react-dom": "19.0.0-rc-dfd30974ab-20240613", + react: "19.0.0-rc-01172397-20240716", + "react-dom": "19.0.0-rc-01172397-20240716", next: version, }, devDependencies: {}, diff --git a/packages/next/package.json b/packages/next/package.json index 87c7fbab8c5c8..d5952331e0ed0 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -106,8 +106,8 @@ "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", - "react": "19.0.0-rc-dfd30974ab-20240613", - "react-dom": "19.0.0-rc-dfd30974ab-20240613", + "react": "19.0.0-rc-01172397-20240716", + "react-dom": "19.0.0-rc-01172397-20240716", "sass": "^1.3.0" }, "peerDependenciesMeta": { diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js index 84110e87630bd..f6341de6a4639 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js @@ -28,11 +28,11 @@ } function copyWithRename(obj, oldPath, newPath) { if (oldPath.length !== newPath.length) - warn("copyWithRename() expects paths of the same length"); + console.warn("copyWithRename() expects paths of the same length"); else { for (var i = 0; i < newPath.length - 1; i++) if (oldPath[i] !== newPath[i]) { - warn( + console.warn( "copyWithRename() expects paths to be the same except for the deepest key" ); return; @@ -73,13 +73,16 @@ function shouldErrorImpl() { return null; } + function createFiber(tag, pendingProps, key, mode) { + return new FiberNode(tag, pendingProps, key, mode); + } function warnInvalidHookAccess() { - error$jscomp$0( + console.error( "Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks" ); } function warnInvalidContextAccess() { - error$jscomp$0( + console.error( "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." ); } @@ -126,41 +129,6 @@ function setRefreshHandler(handler) { resolveFamily = handler; } - function warn(format) { - if (!suppressWarning) { - for ( - var _len = arguments.length, - args = Array(1 < _len ? _len - 1 : 0), - _key = 1; - _key < _len; - _key++ - ) - args[_key - 1] = arguments[_key]; - printWarning("warn", format, args, Error("react-stack-top-frame")); - } - } - function error$jscomp$0(format) { - if (!suppressWarning) { - for ( - var _len2 = arguments.length, - args = Array(1 < _len2 ? _len2 - 1 : 0), - _key2 = 1; - _key2 < _len2; - _key2++ - ) - args[_key2 - 1] = arguments[_key2]; - printWarning("error", format, args, Error("react-stack-top-frame")); - } - } - function printWarning(level, format, args, currentStack) { - !supportsCreateTask && - ReactSharedInternals.getCurrentStack && - ((currentStack = ReactSharedInternals.getCurrentStack(currentStack)), - "" !== currentStack && - ((format += "%s"), (args = args.concat([currentStack])))); - args.unshift(format); - Function.prototype.apply.call(console[level], console, args); - } function isValidContainer(node) { return !( !node || @@ -199,7 +167,7 @@ if ("object" === typeof type) switch ( ("number" === typeof type.tag && - error$jscomp$0( + console.error( "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue." ), type.$$typeof) @@ -345,7 +313,7 @@ }); } 0 > disabledDepth && - error$jscomp$0( + console.error( "disabledDepth fell below zero. This is a bug in React. Please file an issue." ); } @@ -356,8 +324,14 @@ } catch (x) { var match = x.stack.trim().match(/\n( *(at )?)/); prefix = (match && match[1]) || ""; + suffix = + -1 < x.stack.indexOf("\n at") + ? " ()" + : -1 < x.stack.indexOf("@") + ? "@unknown:0:0" + : ""; } - return "\n" + prefix + name; + return "\n" + prefix + name + suffix; } function describeNativeComponentFrame(fn, construct) { if (!fn || reentry) return ""; @@ -536,64 +510,6 @@ function isNotExternal(stackFrame) { return !externalRegExp.test(stackFrame); } - function filterDebugStack(error) { - error = error.stack; - error.startsWith("Error: react-stack-top-frame\n") && - (error = error.slice(29)); - error = error.split("\n").slice(1); - if (null === callComponentFrame) { - var stack = callComponentInDEV( - Error, - "react-stack-top-frame", - {} - ).stack, - startIdx = stack.startsWith("Error: react-stack-top-frame\n") - ? 29 - : 0, - endIdx = stack.indexOf("\n", startIdx); - callComponentFrame = - -1 === endIdx ? stack.slice(startIdx) : stack.slice(startIdx, endIdx); - } - stack = error.indexOf(callComponentFrame); - if ( - -1 === stack && - (null === callLazyInitFrame && - ((stack = callLazyInitInDEV({ - $$typeof: REACT_LAZY_TYPE, - _init: Error, - _payload: "react-stack-top-frame" - }).stack), - (startIdx = stack.startsWith("Error: react-stack-top-frame\n") - ? 29 - : 0), - (endIdx = stack.indexOf("\n", startIdx)), - (callLazyInitFrame = - -1 === endIdx - ? stack.slice(startIdx) - : stack.slice(startIdx, endIdx))), - (stack = error.indexOf(callLazyInitFrame)), - -1 === stack) - ) { - if (null === callIteratorFrame) - try { - callRenderInDEV({ render: null }), (callIteratorFrame = ""); - } catch (error$2) { - (stack = error$2.stack), - (startIdx = stack.startsWith("TypeError: ") - ? stack.indexOf("\n") + 1 - : 0), - (endIdx = stack.indexOf("\n", startIdx)), - (callIteratorFrame = - -1 === endIdx - ? stack.slice(startIdx) - : stack.slice(startIdx, endIdx)); - } - stack = error.indexOf(callIteratorFrame); - } - if (-1 !== stack) error.length = stack; - else return ""; - return error.filter(isNotExternal).join("\n"); - } function describeFiber(fiber) { switch (fiber.tag) { case 26: @@ -632,7 +548,7 @@ var JSCompiler_temp_const = info, env = entry.env; var JSCompiler_inline_result = describeBuiltInComponentFrame( - entry.name + (env ? " (" + env + ")" : "") + entry.name + (env ? " [" + env + "]" : "") ); info = JSCompiler_temp_const + JSCompiler_inline_result; } @@ -654,18 +570,11 @@ var owner = current._debugOwner; return null != owner ? getComponentNameFromOwner(owner) : null; } - function getCurrentParentStackInDev() { - return null === current ? "" : getStackByFiberInDevAndProd(current); - } - function getCurrentFiberStackInDev(stack) { + function getCurrentFiberStackInDev() { if (null === current) return ""; var workInProgress = current; try { var info = ""; - if (stack) { - var formattedTopStack = filterDebugStack(stack); - "" !== formattedTopStack && (info += "\n" + formattedTopStack); - } 6 === workInProgress.tag && (workInProgress = workInProgress.return); switch (workInProgress.tag) { case 26: @@ -695,27 +604,109 @@ workInProgress.type.render )); } - for (stack = workInProgress; stack; ) - if ("number" === typeof stack.tag) { - workInProgress = stack; - stack = workInProgress._debugOwner; - var debugStack = workInProgress._debugStack; - stack && - debugStack && - ("string" !== typeof debugStack && - (workInProgress._debugStack = debugStack = - filterDebugStack(debugStack)), - "" !== debugStack && (info += "\n" + debugStack)); - } else if ("string" === typeof stack.stack) - "" !== stack.stack && (info += "\n" + stack.stack), - (stack = stack.owner); - else break; - var JSCompiler_inline_result = info; + for (; workInProgress; ) + if ("number" === typeof workInProgress.tag) { + var fiber = workInProgress; + workInProgress = fiber._debugOwner; + var debugStack = fiber._debugStack; + if (workInProgress && debugStack) { + if ("string" !== typeof debugStack) { + var stack = debugStack.stack; + stack.startsWith("Error: react-stack-top-frame\n") && + (stack = stack.slice(29)); + var frames = stack.split("\n").slice(1); + if (null === callComponentFrame) { + var stack$jscomp$0 = callComponentInDEV( + Error, + "react-stack-top-frame", + {} + ).stack, + startIdx = stack$jscomp$0.startsWith( + "Error: react-stack-top-frame\n" + ) + ? 29 + : 0, + endIdx = stack$jscomp$0.indexOf("\n", startIdx); + callComponentFrame = + -1 === endIdx + ? stack$jscomp$0.slice(startIdx) + : stack$jscomp$0.slice(startIdx, endIdx); + } + var lastFrameIdx = frames.indexOf(callComponentFrame); + if (-1 === lastFrameIdx) { + if (null === callLazyInitFrame) { + var stack$jscomp$1 = callLazyInitInDEV({ + $$typeof: REACT_LAZY_TYPE, + _init: Error, + _payload: "react-stack-top-frame" + }).stack, + startIdx$jscomp$0 = stack$jscomp$1.startsWith( + "Error: react-stack-top-frame\n" + ) + ? 29 + : 0, + endIdx$jscomp$0 = stack$jscomp$1.indexOf( + "\n", + startIdx$jscomp$0 + ); + callLazyInitFrame = + -1 === endIdx$jscomp$0 + ? stack$jscomp$1.slice(startIdx$jscomp$0) + : stack$jscomp$1.slice( + startIdx$jscomp$0, + endIdx$jscomp$0 + ); + } + lastFrameIdx = frames.indexOf(callLazyInitFrame); + if (-1 === lastFrameIdx) { + if (null === callIteratorFrame) + try { + callRenderInDEV({ render: null }), + (callIteratorFrame = ""); + } catch (error) { + var stack$jscomp$2 = error.stack, + startIdx$jscomp$1 = stack$jscomp$2.startsWith( + "TypeError: " + ) + ? stack$jscomp$2.indexOf("\n") + 1 + : 0, + endIdx$jscomp$1 = stack$jscomp$2.indexOf( + "\n", + startIdx$jscomp$1 + ); + callIteratorFrame = + -1 === endIdx$jscomp$1 + ? stack$jscomp$2.slice(startIdx$jscomp$1) + : stack$jscomp$2.slice( + startIdx$jscomp$1, + endIdx$jscomp$1 + ); + } + lastFrameIdx = frames.indexOf(callIteratorFrame); + } + } + if (-1 !== lastFrameIdx) { + frames.length = lastFrameIdx; + var JSCompiler_inline_result = frames + .filter(isNotExternal) + .join("\n"); + } else JSCompiler_inline_result = ""; + fiber._debugStack = debugStack = JSCompiler_inline_result; + } + "" !== debugStack && (info += "\n" + debugStack); + } + } else if ("string" === typeof workInProgress.stack) { + var ownerStack = workInProgress.stack; + (workInProgress = workInProgress.owner) && + "" !== ownerStack && + (info += "\n" + ownerStack); + } else break; + var JSCompiler_inline_result$jscomp$0 = info; } catch (x) { - JSCompiler_inline_result = + JSCompiler_inline_result$jscomp$0 = "\nError generating stack: " + x.message + "\n" + x.stack; } - return JSCompiler_inline_result; + return JSCompiler_inline_result$jscomp$0; } function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { var previousFiber = current; @@ -859,9 +850,9 @@ } function pop(cursor, fiber) { 0 > index$jscomp$0 - ? error$jscomp$0("Unexpected pop.") + ? console.error("Unexpected pop.") : (fiber !== fiberStack[index$jscomp$0] && - error$jscomp$0("Unexpected Fiber popped."), + console.error("Unexpected Fiber popped."), (cursor.current = valueStack[index$jscomp$0]), (valueStack[index$jscomp$0] = null), (fiberStack[index$jscomp$0] = null), @@ -875,7 +866,7 @@ } function requiredContext(c) { null === c && - error$jscomp$0( + console.error( "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue." ); return c; @@ -980,7 +971,7 @@ function checkAttributeStringCoercion(value, attributeName) { if (willCoercionThrow(value)) return ( - error$jscomp$0( + console.error( "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.", attributeName, typeName(value) @@ -991,7 +982,7 @@ function checkCSSPropertyStringCoercion(value, propName) { if (willCoercionThrow(value)) return ( - error$jscomp$0( + console.error( "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.", propName, typeName(value) @@ -1002,7 +993,7 @@ function checkFormFieldValueStringCoercion(value) { if (willCoercionThrow(value)) return ( - error$jscomp$0( + console.error( "Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.", typeName(value) ), @@ -1015,7 +1006,7 @@ if (hook.isDisabled) return !0; if (!hook.supportsFiber) return ( - error$jscomp$0( + console.error( "The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools" ), !0 @@ -1028,7 +1019,7 @@ (rendererID = hook.inject(internals)), (injectedHook = hook); } catch (err) { - error$jscomp$0("React instrumentation encountered an error: %s.", err); + console.error("React instrumentation encountered an error: %s.", err); } return hook.checkDCE ? !0 : !1; } @@ -1061,7 +1052,7 @@ } catch (err) { hasLoggedError || ((hasLoggedError = !0), - error$jscomp$0( + console.error( "React instrumentation encountered an error: %s", err )); @@ -1069,15 +1060,14 @@ } function setIsStrictModeForDevtools(newIsStrictMode) { "function" === typeof log$1 && - (unstable_setDisableYieldValue(newIsStrictMode), - (suppressWarning = newIsStrictMode)); + unstable_setDisableYieldValue(newIsStrictMode); if (injectedHook && "function" === typeof injectedHook.setStrictMode) try { injectedHook.setStrictMode(rendererID, newIsStrictMode); } catch (err) { hasLoggedError || ((hasLoggedError = !0), - error$jscomp$0( + console.error( "React instrumentation encountered an error: %s", err )); @@ -1214,7 +1204,7 @@ return 0; default: return ( - error$jscomp$0( + console.error( "Should have found matching lanes. This is a bug in React." ), lanes @@ -1289,7 +1279,7 @@ return -1; default: return ( - error$jscomp$0( + console.error( "Should have found matching lanes. This is a bug in React." ), -1 @@ -1507,7 +1497,7 @@ } function registerDirectEvent(registrationName, dependencies) { registrationNameDependencies[registrationName] && - error$jscomp$0( + console.error( "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", registrationName ); @@ -1531,17 +1521,17 @@ props.disabled || null == props.value || ("select" === tagName - ? error$jscomp$0( + ? console.error( "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`." ) - : error$jscomp$0( + : console.error( "You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`." )); props.onChange || props.readOnly || props.disabled || null == props.checked || - error$jscomp$0( + console.error( "You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`." ); } @@ -1553,7 +1543,7 @@ if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) return (validatedAttributeNameCache[attributeName] = !0); illegalAttributeNameCache[attributeName] = !0; - error$jscomp$0("Invalid attribute name: `%s`", attributeName); + console.error("Invalid attribute name: `%s`", attributeName); return !1; } function getValueForAttributeOnCustomComponent(node, name, expected) { @@ -1733,7 +1723,7 @@ void 0 === props.checked || void 0 === props.defaultChecked || didWarnCheckedDefaultChecked || - (error$jscomp$0( + (console.error( "%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type @@ -1742,7 +1732,7 @@ void 0 === props.value || void 0 === props.defaultValue || didWarnValueDefaultValue$1 || - (error$jscomp$0( + (console.error( "%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type @@ -1854,19 +1844,19 @@ "bigint" === typeof child || didWarnInvalidChild || ((didWarnInvalidChild = !0), - error$jscomp$0( + console.error( "Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to