react-dom
Advanced tools
Comparing version 19.0.0-rc-3563387fe3-20240621 to 19.0.0-rc-372ec00c-20241209
@@ -14,22 +14,3 @@ /** | ||
(function () { | ||
function error(format) { | ||
for ( | ||
var _len2 = arguments.length, | ||
args = Array(1 < _len2 ? _len2 - 1 : 0), | ||
_key2 = 1; | ||
_key2 < _len2; | ||
_key2++ | ||
) | ||
args[_key2 - 1] = arguments[_key2]; | ||
_len2 = format; | ||
_key2 = Error("react-stack-top-frame"); | ||
ReactSharedInternals.getCurrentStack && | ||
((_key2 = ReactSharedInternals.getCurrentStack(_key2)), | ||
"" !== _key2 && ((_len2 += "%s"), (args = args.concat([_key2])))); | ||
args.unshift(_len2); | ||
Function.prototype.apply.call(console.error, console, args); | ||
} | ||
var React = require("react"), | ||
ReactSharedInternals = | ||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, | ||
didWarnAboutUsingAct = !1; | ||
@@ -39,3 +20,3 @@ exports.act = function (callback) { | ||
((didWarnAboutUsingAct = !0), | ||
error( | ||
console.error( | ||
"`ReactDOMTestUtils.act` is deprecated in favor of `React.act`. Import `act` from `react` instead of `react-dom/test-utils`. See https://react.dev/warnings/react-dom-test-utils for more info." | ||
@@ -42,0 +23,0 @@ )); |
@@ -15,19 +15,2 @@ /** | ||
function noop() {} | ||
function error(format) { | ||
for ( | ||
var _len2 = arguments.length, | ||
args = Array(1 < _len2 ? _len2 - 1 : 0), | ||
_key2 = 1; | ||
_key2 < _len2; | ||
_key2++ | ||
) | ||
args[_key2 - 1] = arguments[_key2]; | ||
_len2 = format; | ||
_key2 = Error("react-stack-top-frame"); | ||
ReactSharedInternals.getCurrentStack && | ||
((_key2 = ReactSharedInternals.getCurrentStack(_key2)), | ||
"" !== _key2 && ((_len2 += "%s"), (args = args.concat([_key2])))); | ||
args.unshift(_len2); | ||
Function.prototype.apply.call(console.error, console, args); | ||
} | ||
function testStringCoercion(value) { | ||
@@ -46,3 +29,3 @@ return "" + value; | ||
JSCompiler_inline_result && | ||
(error( | ||
(console.error( | ||
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", | ||
@@ -73,6 +56,6 @@ ("function" === typeof Symbol && | ||
: void 0 === thing | ||
? "`undefined`" | ||
: "" === thing | ||
? "an empty string" | ||
: 'something with type "' + typeof thing + '"'; | ||
? "`undefined`" | ||
: "" === thing | ||
? "an empty string" | ||
: 'something with type "' + typeof thing + '"'; | ||
} | ||
@@ -83,10 +66,10 @@ function getValueDescriptorExpectingEnumForWarning(thing) { | ||
: void 0 === thing | ||
? "`undefined`" | ||
: "" === thing | ||
? "an empty string" | ||
: "string" === typeof thing | ||
? JSON.stringify(thing) | ||
: "number" === typeof thing | ||
? "`" + thing + "`" | ||
: 'something with type "' + typeof thing + '"'; | ||
? "`undefined`" | ||
: "" === thing | ||
? "an empty string" | ||
: "string" === typeof thing | ||
? JSON.stringify(thing) | ||
: "number" === typeof thing | ||
? "`" + thing + "`" | ||
: 'something with type "' + typeof thing + '"'; | ||
} | ||
@@ -96,3 +79,3 @@ function resolveDispatcher() { | ||
null === dispatcher && | ||
error( | ||
console.error( | ||
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem." | ||
@@ -126,5 +109,5 @@ ); | ||
}, | ||
REACT_PORTAL_TYPE = Symbol.for("react.portal"), | ||
ReactSharedInternals = | ||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, | ||
REACT_PORTAL_TYPE = Symbol.for("react.portal"); | ||
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; | ||
("function" === typeof Map && | ||
@@ -137,3 +120,3 @@ null != Map.prototype && | ||
"function" === typeof Set.prototype.forEach) || | ||
error( | ||
console.error( | ||
"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills" | ||
@@ -165,3 +148,3 @@ ); | ||
Internals.d.f() && | ||
error( | ||
console.error( | ||
"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task." | ||
@@ -174,3 +157,3 @@ ); | ||
? null != options && "object" !== typeof options | ||
? error( | ||
? console.error( | ||
"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.", | ||
@@ -181,7 +164,7 @@ getValueDescriptorExpectingEnumForWarning(options) | ||
"string" !== typeof options.crossOrigin && | ||
error( | ||
console.error( | ||
"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.", | ||
getValueDescriptorExpectingObjectForWarning(options.crossOrigin) | ||
) | ||
: error( | ||
: console.error( | ||
"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", | ||
@@ -204,3 +187,3 @@ getValueDescriptorExpectingObjectForWarning(href) | ||
if ("string" !== typeof href || !href) | ||
error( | ||
console.error( | ||
"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", | ||
@@ -212,7 +195,7 @@ getValueDescriptorExpectingObjectForWarning(href) | ||
"object" === typeof options && options.hasOwnProperty("crossOrigin") | ||
? error( | ||
? console.error( | ||
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", | ||
getValueDescriptorExpectingEnumForWarning(options) | ||
) | ||
: error( | ||
: console.error( | ||
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", | ||
@@ -227,3 +210,3 @@ getValueDescriptorExpectingEnumForWarning(options) | ||
? null == options || "object" !== typeof options | ||
? error( | ||
? console.error( | ||
"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.", | ||
@@ -234,7 +217,7 @@ getValueDescriptorExpectingEnumForWarning(options) | ||
"script" !== options.as && | ||
error( | ||
console.error( | ||
'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".', | ||
getValueDescriptorExpectingEnumForWarning(options.as) | ||
) | ||
: error( | ||
: console.error( | ||
"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", | ||
@@ -297,3 +280,3 @@ getValueDescriptorExpectingObjectForWarning(href) | ||
if (encountered) | ||
error( | ||
console.error( | ||
"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s", | ||
@@ -313,3 +296,3 @@ encountered | ||
getValueDescriptorExpectingEnumForWarning(encountered)), | ||
error( | ||
console.error( | ||
'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)', | ||
@@ -356,3 +339,3 @@ encountered, | ||
encountered && | ||
error( | ||
console.error( | ||
'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s', | ||
@@ -418,3 +401,3 @@ encountered | ||
encountered && | ||
error( | ||
console.error( | ||
'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s', | ||
@@ -454,3 +437,3 @@ encountered | ||
}; | ||
exports.version = "19.0.0-rc-3563387fe3-20240621"; | ||
exports.version = "19.0.0-rc-372ec00c-20241209"; | ||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && | ||
@@ -457,0 +440,0 @@ "function" === |
@@ -210,2 +210,2 @@ /** | ||
}; | ||
exports.version = "19.0.0-rc-3563387fe3-20240621"; | ||
exports.version = "19.0.0-rc-372ec00c-20241209"; |
@@ -15,19 +15,2 @@ /** | ||
function noop() {} | ||
function error(format) { | ||
for ( | ||
var _len2 = arguments.length, | ||
args = Array(1 < _len2 ? _len2 - 1 : 0), | ||
_key2 = 1; | ||
_key2 < _len2; | ||
_key2++ | ||
) | ||
args[_key2 - 1] = arguments[_key2]; | ||
_len2 = format; | ||
_key2 = Error("react-stack-top-frame"); | ||
ReactSharedInternalsServer.getCurrentStack && | ||
((_key2 = ReactSharedInternalsServer.getCurrentStack(_key2)), | ||
"" !== _key2 && ((_len2 += "%s"), (args = args.concat([_key2])))); | ||
args.unshift(_len2); | ||
Function.prototype.apply.call(console.error, console, args); | ||
} | ||
function getCrossOriginStringAs(as, input) { | ||
@@ -42,6 +25,6 @@ if ("font" === as) return ""; | ||
: void 0 === thing | ||
? "`undefined`" | ||
: "" === thing | ||
? "an empty string" | ||
: 'something with type "' + typeof thing + '"'; | ||
? "`undefined`" | ||
: "" === thing | ||
? "an empty string" | ||
: 'something with type "' + typeof thing + '"'; | ||
} | ||
@@ -52,10 +35,10 @@ function getValueDescriptorExpectingEnumForWarning(thing) { | ||
: void 0 === thing | ||
? "`undefined`" | ||
: "" === thing | ||
? "an empty string" | ||
: "string" === typeof thing | ||
? JSON.stringify(thing) | ||
: "number" === typeof thing | ||
? "`" + thing + "`" | ||
: 'something with type "' + typeof thing + '"'; | ||
? "`undefined`" | ||
: "" === thing | ||
? "an empty string" | ||
: "string" === typeof thing | ||
? JSON.stringify(thing) | ||
: "number" === typeof thing | ||
? "`" + thing + "`" | ||
: 'something with type "' + typeof thing + '"'; | ||
} | ||
@@ -81,6 +64,4 @@ var React = require("react"), | ||
findDOMNode: null | ||
}, | ||
ReactSharedInternalsServer = | ||
React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; | ||
if (!ReactSharedInternalsServer) | ||
}; | ||
if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE) | ||
throw Error( | ||
@@ -96,3 +77,3 @@ 'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.' | ||
"function" === typeof Set.prototype.forEach) || | ||
error( | ||
console.error( | ||
"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills" | ||
@@ -105,3 +86,3 @@ ); | ||
? null != options && "object" !== typeof options | ||
? error( | ||
? console.error( | ||
"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.", | ||
@@ -112,7 +93,7 @@ getValueDescriptorExpectingEnumForWarning(options) | ||
"string" !== typeof options.crossOrigin && | ||
error( | ||
console.error( | ||
"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.", | ||
getValueDescriptorExpectingObjectForWarning(options.crossOrigin) | ||
) | ||
: error( | ||
: console.error( | ||
"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", | ||
@@ -135,3 +116,3 @@ getValueDescriptorExpectingObjectForWarning(href) | ||
if ("string" !== typeof href || !href) | ||
error( | ||
console.error( | ||
"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", | ||
@@ -143,7 +124,7 @@ getValueDescriptorExpectingObjectForWarning(href) | ||
"object" === typeof options && options.hasOwnProperty("crossOrigin") | ||
? error( | ||
? console.error( | ||
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", | ||
getValueDescriptorExpectingEnumForWarning(options) | ||
) | ||
: error( | ||
: console.error( | ||
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", | ||
@@ -158,3 +139,3 @@ getValueDescriptorExpectingEnumForWarning(options) | ||
? null == options || "object" !== typeof options | ||
? error( | ||
? console.error( | ||
"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.", | ||
@@ -165,7 +146,7 @@ getValueDescriptorExpectingEnumForWarning(options) | ||
"script" !== options.as && | ||
error( | ||
console.error( | ||
'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".', | ||
getValueDescriptorExpectingEnumForWarning(options.as) | ||
) | ||
: error( | ||
: console.error( | ||
"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", | ||
@@ -228,3 +209,3 @@ getValueDescriptorExpectingObjectForWarning(href) | ||
if (encountered) | ||
error( | ||
console.error( | ||
"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s", | ||
@@ -244,3 +225,3 @@ encountered | ||
getValueDescriptorExpectingEnumForWarning(encountered)), | ||
error( | ||
console.error( | ||
'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)', | ||
@@ -287,3 +268,3 @@ encountered, | ||
encountered && | ||
error( | ||
console.error( | ||
'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s', | ||
@@ -349,3 +330,3 @@ encountered | ||
encountered && | ||
error( | ||
console.error( | ||
'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s', | ||
@@ -373,3 +354,3 @@ encountered | ||
}; | ||
exports.version = "19.0.0-rc-3563387fe3-20240621"; | ||
exports.version = "19.0.0-rc-372ec00c-20241209"; | ||
})(); |
@@ -152,2 +152,2 @@ /** | ||
}; | ||
exports.version = "19.0.0-rc-3563387fe3-20240621"; | ||
exports.version = "19.0.0-rc-372ec00c-20241209"; |
{ | ||
"name": "react-dom", | ||
"version": "19.0.0-rc-3563387fe3-20240621", | ||
"version": "19.0.0-rc-372ec00c-20241209", | ||
"description": "React package for working with the DOM.", | ||
@@ -20,6 +20,6 @@ "main": "index.js", | ||
"dependencies": { | ||
"scheduler": "0.25.0-rc-3563387fe3-20240621" | ||
"scheduler": "0.25.0-rc-372ec00c-20241209" | ||
}, | ||
"peerDependencies": { | ||
"react": "19.0.0-rc-3563387fe3-20240621" | ||
"react": "19.0.0-rc-372ec00c-20241209" | ||
}, | ||
@@ -26,0 +26,0 @@ "files": [ |
@@ -12,1 +12,2 @@ 'use strict'; | ||
exports.prerender = s.prerender; | ||
exports.resumeAndPrerender = s.resumeAndPrerender; |
@@ -12,1 +12,2 @@ 'use strict'; | ||
exports.prerender = s.prerender; | ||
exports.resumeAndPrerender = s.resumeAndPrerender; |
@@ -12,1 +12,2 @@ 'use strict'; | ||
exports.prerenderToNodeStream = s.prerenderToNodeStream; | ||
exports.resumeAndPrerenderToNodeStream = s.resumeAndPrerenderToNodeStream; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 5 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 3 instances in 1 package
6380418
170470
15
+ Addedreact@19.0.0-rc-372ec00c-20241209(transitive)
+ Addedscheduler@0.25.0-rc-372ec00c-20241209(transitive)
- Removedreact@19.0.0-rc-3563387fe3-20240621(transitive)
- Removedscheduler@0.25.0-rc-3563387fe3-20240621(transitive)