react 19.0.0-rc-9598c41a20-20240603 → 19.0.0-rc-1df34bdf62-20240605
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/react-compiler-runtime.development.js +3 -3
- package/cjs/react-jsx-dev-runtime.development.js +3 -3
- package/cjs/react-jsx-dev-runtime.react-server.development.js +3 -3
- package/cjs/react-jsx-runtime.development.js +3 -3
- package/cjs/react-jsx-runtime.react-server.development.js +3 -3
- package/cjs/react.development.js +5 -5
- package/cjs/react.production.js +1 -1
- package/cjs/react.react-server.development.js +7 -93
- package/cjs/react.react-server.production.js +3 -55
- package/package.json +1 -1
@@ -25,12 +25,12 @@ function error(format) {
|
|
25
25
|
args[_key2 - 1] = arguments[_key2];
|
26
26
|
}
|
27
27
|
|
28
|
-
printWarning('error', format, args);
|
28
|
+
printWarning('error', format, args, new Error('react-stack-top-frame'));
|
29
29
|
}
|
30
30
|
}
|
31
31
|
} // eslint-disable-next-line react-internal/no-production-logging
|
32
32
|
|
33
|
-
function printWarning(level, format, args) {
|
33
|
+
function printWarning(level, format, args, currentStack) {
|
34
34
|
// When changing this logic, you might want to also
|
35
35
|
// update consoleWithStackDev.www.js as well.
|
36
36
|
{
|
@@ -40,7 +40,7 @@ function printWarning(level, format, args) {
|
|
40
40
|
// We only add the current stack to the console when createTask is not supported.
|
41
41
|
// Since createTask requires DevTools to be open to work, this means that stacks
|
42
42
|
// can be lost while DevTools isn't open but we can't detect this.
|
43
|
-
var stack = ReactSharedInternals.getCurrentStack();
|
43
|
+
var stack = ReactSharedInternals.getCurrentStack(currentStack);
|
44
44
|
|
45
45
|
if (stack !== '') {
|
46
46
|
format += '%s';
|
@@ -74,12 +74,12 @@ function error(format) {
|
|
74
74
|
args[_key2 - 1] = arguments[_key2];
|
75
75
|
}
|
76
76
|
|
77
|
-
printWarning('error', format, args);
|
77
|
+
printWarning('error', format, args, new Error('react-stack-top-frame'));
|
78
78
|
}
|
79
79
|
}
|
80
80
|
} // eslint-disable-next-line react-internal/no-production-logging
|
81
81
|
|
82
|
-
function printWarning(level, format, args) {
|
82
|
+
function printWarning(level, format, args, currentStack) {
|
83
83
|
// When changing this logic, you might want to also
|
84
84
|
// update consoleWithStackDev.www.js as well.
|
85
85
|
{
|
@@ -89,7 +89,7 @@ function printWarning(level, format, args) {
|
|
89
89
|
// We only add the current stack to the console when createTask is not supported.
|
90
90
|
// Since createTask requires DevTools to be open to work, this means that stacks
|
91
91
|
// can be lost while DevTools isn't open but we can't detect this.
|
92
|
-
var stack = ReactSharedInternals.getCurrentStack();
|
92
|
+
var stack = ReactSharedInternals.getCurrentStack(currentStack);
|
93
93
|
|
94
94
|
if (stack !== '') {
|
95
95
|
format += '%s';
|
@@ -79,12 +79,12 @@ function error(format) {
|
|
79
79
|
args[_key2 - 1] = arguments[_key2];
|
80
80
|
}
|
81
81
|
|
82
|
-
printWarning('error', format, args);
|
82
|
+
printWarning('error', format, args, new Error('react-stack-top-frame'));
|
83
83
|
}
|
84
84
|
}
|
85
85
|
} // eslint-disable-next-line react-internal/no-production-logging
|
86
86
|
|
87
|
-
function printWarning(level, format, args) {
|
87
|
+
function printWarning(level, format, args, currentStack) {
|
88
88
|
// When changing this logic, you might want to also
|
89
89
|
// update consoleWithStackDev.www.js as well.
|
90
90
|
{
|
@@ -94,7 +94,7 @@ function printWarning(level, format, args) {
|
|
94
94
|
// We only add the current stack to the console when createTask is not supported.
|
95
95
|
// Since createTask requires DevTools to be open to work, this means that stacks
|
96
96
|
// can be lost while DevTools isn't open but we can't detect this.
|
97
|
-
var stack = ReactSharedInternalsServer.getCurrentStack();
|
97
|
+
var stack = ReactSharedInternalsServer.getCurrentStack(currentStack);
|
98
98
|
|
99
99
|
if (stack !== '') {
|
100
100
|
format += '%s';
|
@@ -74,12 +74,12 @@ function error(format) {
|
|
74
74
|
args[_key2 - 1] = arguments[_key2];
|
75
75
|
}
|
76
76
|
|
77
|
-
printWarning('error', format, args);
|
77
|
+
printWarning('error', format, args, new Error('react-stack-top-frame'));
|
78
78
|
}
|
79
79
|
}
|
80
80
|
} // eslint-disable-next-line react-internal/no-production-logging
|
81
81
|
|
82
|
-
function printWarning(level, format, args) {
|
82
|
+
function printWarning(level, format, args, currentStack) {
|
83
83
|
// When changing this logic, you might want to also
|
84
84
|
// update consoleWithStackDev.www.js as well.
|
85
85
|
{
|
@@ -89,7 +89,7 @@ function printWarning(level, format, args) {
|
|
89
89
|
// We only add the current stack to the console when createTask is not supported.
|
90
90
|
// Since createTask requires DevTools to be open to work, this means that stacks
|
91
91
|
// can be lost while DevTools isn't open but we can't detect this.
|
92
|
-
var stack = ReactSharedInternals.getCurrentStack();
|
92
|
+
var stack = ReactSharedInternals.getCurrentStack(currentStack);
|
93
93
|
|
94
94
|
if (stack !== '') {
|
95
95
|
format += '%s';
|
@@ -79,12 +79,12 @@ function error(format) {
|
|
79
79
|
args[_key2 - 1] = arguments[_key2];
|
80
80
|
}
|
81
81
|
|
82
|
-
printWarning('error', format, args);
|
82
|
+
printWarning('error', format, args, new Error('react-stack-top-frame'));
|
83
83
|
}
|
84
84
|
}
|
85
85
|
} // eslint-disable-next-line react-internal/no-production-logging
|
86
86
|
|
87
|
-
function printWarning(level, format, args) {
|
87
|
+
function printWarning(level, format, args, currentStack) {
|
88
88
|
// When changing this logic, you might want to also
|
89
89
|
// update consoleWithStackDev.www.js as well.
|
90
90
|
{
|
@@ -94,7 +94,7 @@ function printWarning(level, format, args) {
|
|
94
94
|
// We only add the current stack to the console when createTask is not supported.
|
95
95
|
// Since createTask requires DevTools to be open to work, this means that stacks
|
96
96
|
// can be lost while DevTools isn't open but we can't detect this.
|
97
|
-
var stack = ReactSharedInternalsServer.getCurrentStack();
|
97
|
+
var stack = ReactSharedInternalsServer.getCurrentStack(currentStack);
|
98
98
|
|
99
99
|
if (stack !== '') {
|
100
100
|
format += '%s';
|
package/cjs/react.development.js
CHANGED
@@ -20,7 +20,7 @@ if (
|
|
20
20
|
) {
|
21
21
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
22
22
|
}
|
23
|
-
var ReactVersion = '19.0.0-rc-
|
23
|
+
var ReactVersion = '19.0.0-rc-1df34bdf62-20240605';
|
24
24
|
|
25
25
|
// -----------------------------------------------------------------------------
|
26
26
|
|
@@ -104,7 +104,7 @@ function warn(format) {
|
|
104
104
|
args[_key - 1] = arguments[_key];
|
105
105
|
}
|
106
106
|
|
107
|
-
printWarning('warn', format, args);
|
107
|
+
printWarning('warn', format, args, new Error('react-stack-top-frame'));
|
108
108
|
}
|
109
109
|
}
|
110
110
|
}
|
@@ -115,12 +115,12 @@ function error(format) {
|
|
115
115
|
args[_key2 - 1] = arguments[_key2];
|
116
116
|
}
|
117
117
|
|
118
|
-
printWarning('error', format, args);
|
118
|
+
printWarning('error', format, args, new Error('react-stack-top-frame'));
|
119
119
|
}
|
120
120
|
}
|
121
121
|
} // eslint-disable-next-line react-internal/no-production-logging
|
122
122
|
|
123
|
-
function printWarning(level, format, args) {
|
123
|
+
function printWarning(level, format, args, currentStack) {
|
124
124
|
// When changing this logic, you might want to also
|
125
125
|
// update consoleWithStackDev.www.js as well.
|
126
126
|
{
|
@@ -130,7 +130,7 @@ function printWarning(level, format, args) {
|
|
130
130
|
// We only add the current stack to the console when createTask is not supported.
|
131
131
|
// Since createTask requires DevTools to be open to work, this means that stacks
|
132
132
|
// can be lost while DevTools isn't open but we can't detect this.
|
133
|
-
var stack = ReactSharedInternals.getCurrentStack();
|
133
|
+
var stack = ReactSharedInternals.getCurrentStack(currentStack);
|
134
134
|
|
135
135
|
if (stack !== '') {
|
136
136
|
format += '%s';
|
package/cjs/react.production.js
CHANGED
@@ -54,7 +54,7 @@ function warn(format) {
|
|
54
54
|
args[_key - 1] = arguments[_key];
|
55
55
|
}
|
56
56
|
|
57
|
-
printWarning('warn', format, args);
|
57
|
+
printWarning('warn', format, args, new Error('react-stack-top-frame'));
|
58
58
|
}
|
59
59
|
}
|
60
60
|
}
|
@@ -65,12 +65,12 @@ function error(format) {
|
|
65
65
|
args[_key2 - 1] = arguments[_key2];
|
66
66
|
}
|
67
67
|
|
68
|
-
printWarning('error', format, args);
|
68
|
+
printWarning('error', format, args, new Error('react-stack-top-frame'));
|
69
69
|
}
|
70
70
|
}
|
71
71
|
} // eslint-disable-next-line react-internal/no-production-logging
|
72
72
|
|
73
|
-
function printWarning(level, format, args) {
|
73
|
+
function printWarning(level, format, args, currentStack) {
|
74
74
|
// When changing this logic, you might want to also
|
75
75
|
// update consoleWithStackDev.www.js as well.
|
76
76
|
{
|
@@ -80,7 +80,7 @@ function printWarning(level, format, args) {
|
|
80
80
|
// We only add the current stack to the console when createTask is not supported.
|
81
81
|
// Since createTask requires DevTools to be open to work, this means that stacks
|
82
82
|
// can be lost while DevTools isn't open but we can't detect this.
|
83
|
-
var stack = ReactSharedInternals.getCurrentStack();
|
83
|
+
var stack = ReactSharedInternals.getCurrentStack(currentStack);
|
84
84
|
|
85
85
|
if (stack !== '') {
|
86
86
|
format += '%s';
|
@@ -1421,7 +1421,7 @@ function getElementKey(element, index) {
|
|
1421
1421
|
return index.toString(36);
|
1422
1422
|
}
|
1423
1423
|
|
1424
|
-
function noop
|
1424
|
+
function noop() {}
|
1425
1425
|
|
1426
1426
|
function resolveThenable(thenable) {
|
1427
1427
|
switch (thenable.status) {
|
@@ -1445,7 +1445,7 @@ function resolveThenable(thenable) {
|
|
1445
1445
|
// some custom userspace implementation. We treat it as "pending".
|
1446
1446
|
// Attach a dummy listener, to ensure that any lazy initialization can
|
1447
1447
|
// happen. Flight lazily parses JSON when the value is actually awaited.
|
1448
|
-
thenable.then(noop
|
1448
|
+
thenable.then(noop, noop);
|
1449
1449
|
} else {
|
1450
1450
|
// This is an uncached thenable that we haven't seen before.
|
1451
1451
|
// TODO: Detect infinite ping loops caused by uncached promises.
|
@@ -1788,13 +1788,6 @@ function use(usable) {
|
|
1788
1788
|
var dispatcher = resolveDispatcher();
|
1789
1789
|
return dispatcher.use(usable);
|
1790
1790
|
}
|
1791
|
-
function useActionState(action, initialState, permalink) {
|
1792
|
-
{
|
1793
|
-
var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] This is unstable, thus optional
|
1794
|
-
|
1795
|
-
return dispatcher.useActionState(action, initialState, permalink);
|
1796
|
-
}
|
1797
|
-
}
|
1798
1791
|
|
1799
1792
|
function forwardRef(render) {
|
1800
1793
|
{
|
@@ -2075,84 +2068,7 @@ function cache(fn) {
|
|
2075
2068
|
};
|
2076
2069
|
}
|
2077
2070
|
|
2078
|
-
var
|
2079
|
-
// emulating an uncaught JavaScript error.
|
2080
|
-
reportError : function (error) {
|
2081
|
-
if (typeof window === 'object' && typeof window.ErrorEvent === 'function') {
|
2082
|
-
// Browser Polyfill
|
2083
|
-
var message = typeof error === 'object' && error !== null && typeof error.message === 'string' ? // eslint-disable-next-line react-internal/safe-string-coercion
|
2084
|
-
String(error.message) : // eslint-disable-next-line react-internal/safe-string-coercion
|
2085
|
-
String(error);
|
2086
|
-
var event = new window.ErrorEvent('error', {
|
2087
|
-
bubbles: true,
|
2088
|
-
cancelable: true,
|
2089
|
-
message: message,
|
2090
|
-
error: error
|
2091
|
-
});
|
2092
|
-
var shouldLog = window.dispatchEvent(event);
|
2093
|
-
|
2094
|
-
if (!shouldLog) {
|
2095
|
-
return;
|
2096
|
-
}
|
2097
|
-
} else if (typeof process === 'object' && // $FlowFixMe[method-unbinding]
|
2098
|
-
typeof process.emit === 'function') {
|
2099
|
-
// Node Polyfill
|
2100
|
-
process.emit('uncaughtException', error);
|
2101
|
-
return;
|
2102
|
-
} // eslint-disable-next-line react-internal/no-production-logging
|
2103
|
-
|
2104
|
-
|
2105
|
-
console['error'](error);
|
2106
|
-
};
|
2107
|
-
|
2108
|
-
function startTransition(scope, options) {
|
2109
|
-
var prevTransition = ReactSharedInternals.T;
|
2110
|
-
var transition = {};
|
2111
|
-
ReactSharedInternals.T = transition;
|
2112
|
-
var currentTransition = ReactSharedInternals.T;
|
2113
|
-
|
2114
|
-
{
|
2115
|
-
ReactSharedInternals.T._updatedFibers = new Set();
|
2116
|
-
}
|
2117
|
-
|
2118
|
-
{
|
2119
|
-
try {
|
2120
|
-
var returnValue = scope();
|
2121
|
-
var onStartTransitionFinish = ReactSharedInternals.S;
|
2122
|
-
|
2123
|
-
if (onStartTransitionFinish !== null) {
|
2124
|
-
onStartTransitionFinish(transition, returnValue);
|
2125
|
-
}
|
2126
|
-
|
2127
|
-
if (typeof returnValue === 'object' && returnValue !== null && typeof returnValue.then === 'function') {
|
2128
|
-
returnValue.then(noop, reportGlobalError);
|
2129
|
-
}
|
2130
|
-
} catch (error) {
|
2131
|
-
reportGlobalError(error);
|
2132
|
-
} finally {
|
2133
|
-
warnAboutTransitionSubscriptions(prevTransition, currentTransition);
|
2134
|
-
ReactSharedInternals.T = prevTransition;
|
2135
|
-
}
|
2136
|
-
}
|
2137
|
-
}
|
2138
|
-
|
2139
|
-
function warnAboutTransitionSubscriptions(prevTransition, currentTransition) {
|
2140
|
-
{
|
2141
|
-
if (prevTransition === null && currentTransition._updatedFibers) {
|
2142
|
-
var updatedFibersCount = currentTransition._updatedFibers.size;
|
2143
|
-
|
2144
|
-
currentTransition._updatedFibers.clear();
|
2145
|
-
|
2146
|
-
if (updatedFibersCount > 10) {
|
2147
|
-
warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');
|
2148
|
-
}
|
2149
|
-
}
|
2150
|
-
}
|
2151
|
-
}
|
2152
|
-
|
2153
|
-
function noop() {}
|
2154
|
-
|
2155
|
-
var ReactVersion = '19.0.0-rc-9598c41a20-20240603';
|
2071
|
+
var ReactVersion = '19.0.0-rc-1df34bdf62-20240605';
|
2156
2072
|
|
2157
2073
|
var Children = {
|
2158
2074
|
map: mapChildren,
|
@@ -2176,9 +2092,7 @@ exports.forwardRef = forwardRef;
|
|
2176
2092
|
exports.isValidElement = isValidElement;
|
2177
2093
|
exports.lazy = lazy;
|
2178
2094
|
exports.memo = memo;
|
2179
|
-
exports.startTransition = startTransition;
|
2180
2095
|
exports.use = use;
|
2181
|
-
exports.useActionState = useActionState;
|
2182
2096
|
exports.useCallback = useCallback;
|
2183
2097
|
exports.useDebugValue = useDebugValue;
|
2184
2098
|
exports.useId = useId;
|
@@ -88,7 +88,7 @@ function getElementKey(element, index) {
|
|
88
88
|
? escape("" + element.key)
|
89
89
|
: index.toString(36);
|
90
90
|
}
|
91
|
-
function noop
|
91
|
+
function noop() {}
|
92
92
|
function resolveThenable(thenable) {
|
93
93
|
switch (thenable.status) {
|
94
94
|
case "fulfilled":
|
@@ -98,7 +98,7 @@ function resolveThenable(thenable) {
|
|
98
98
|
default:
|
99
99
|
switch (
|
100
100
|
("string" === typeof thenable.status
|
101
|
-
? thenable.then(noop
|
101
|
+
? thenable.then(noop, noop)
|
102
102
|
: ((thenable.status = "pending"),
|
103
103
|
thenable.then(
|
104
104
|
function (fulfilledValue) {
|
@@ -265,36 +265,6 @@ function createCacheRoot() {
|
|
265
265
|
function createCacheNode() {
|
266
266
|
return { s: 0, v: void 0, o: null, p: null };
|
267
267
|
}
|
268
|
-
var reportGlobalError =
|
269
|
-
"function" === typeof reportError
|
270
|
-
? reportError
|
271
|
-
: function (error) {
|
272
|
-
if (
|
273
|
-
"object" === typeof window &&
|
274
|
-
"function" === typeof window.ErrorEvent
|
275
|
-
) {
|
276
|
-
var event = new window.ErrorEvent("error", {
|
277
|
-
bubbles: !0,
|
278
|
-
cancelable: !0,
|
279
|
-
message:
|
280
|
-
"object" === typeof error &&
|
281
|
-
null !== error &&
|
282
|
-
"string" === typeof error.message
|
283
|
-
? String(error.message)
|
284
|
-
: String(error),
|
285
|
-
error: error
|
286
|
-
});
|
287
|
-
if (!window.dispatchEvent(event)) return;
|
288
|
-
} else if (
|
289
|
-
"object" === typeof process &&
|
290
|
-
"function" === typeof process.emit
|
291
|
-
) {
|
292
|
-
process.emit("uncaughtException", error);
|
293
|
-
return;
|
294
|
-
}
|
295
|
-
console.error(error);
|
296
|
-
};
|
297
|
-
function noop() {}
|
298
268
|
exports.Children = {
|
299
269
|
map: mapChildren,
|
300
270
|
forEach: function (children, forEachFunc, forEachContext) {
|
@@ -441,31 +411,9 @@ exports.memo = function (type, compare) {
|
|
441
411
|
compare: void 0 === compare ? null : compare
|
442
412
|
};
|
443
413
|
};
|
444
|
-
exports.startTransition = function (scope) {
|
445
|
-
var prevTransition = ReactSharedInternals.T,
|
446
|
-
transition = {};
|
447
|
-
ReactSharedInternals.T = transition;
|
448
|
-
try {
|
449
|
-
var returnValue = scope(),
|
450
|
-
onStartTransitionFinish = ReactSharedInternals.S;
|
451
|
-
null !== onStartTransitionFinish &&
|
452
|
-
onStartTransitionFinish(transition, returnValue);
|
453
|
-
"object" === typeof returnValue &&
|
454
|
-
null !== returnValue &&
|
455
|
-
"function" === typeof returnValue.then &&
|
456
|
-
returnValue.then(noop, reportGlobalError);
|
457
|
-
} catch (error) {
|
458
|
-
reportGlobalError(error);
|
459
|
-
} finally {
|
460
|
-
ReactSharedInternals.T = prevTransition;
|
461
|
-
}
|
462
|
-
};
|
463
414
|
exports.use = function (usable) {
|
464
415
|
return ReactSharedInternals.H.use(usable);
|
465
416
|
};
|
466
|
-
exports.useActionState = function (action, initialState, permalink) {
|
467
|
-
return ReactSharedInternals.H.useActionState(action, initialState, permalink);
|
468
|
-
};
|
469
417
|
exports.useCallback = function (callback, deps) {
|
470
418
|
return ReactSharedInternals.H.useCallback(callback, deps);
|
471
419
|
};
|
@@ -476,4 +424,4 @@ exports.useId = function () {
|
|
476
424
|
exports.useMemo = function (create, deps) {
|
477
425
|
return ReactSharedInternals.H.useMemo(create, deps);
|
478
426
|
};
|
479
|
-
exports.version = "19.0.0-rc-
|
427
|
+
exports.version = "19.0.0-rc-1df34bdf62-20240605";
|