react-server-dom-turbopack 19.2.7 → 19.2.8
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-server-dom-turbopack-client.browser.development.js +2 -2
- package/cjs/react-server-dom-turbopack-server.browser.development.js +29 -29
- package/cjs/react-server-dom-turbopack-server.browser.production.js +26 -29
- package/cjs/react-server-dom-turbopack-server.edge.development.js +31 -31
- package/cjs/react-server-dom-turbopack-server.edge.production.js +30 -33
- package/cjs/react-server-dom-turbopack-server.node.development.js +31 -31
- package/cjs/react-server-dom-turbopack-server.node.production.js +30 -33
- package/package.json +5 -5
|
@@ -4885,10 +4885,10 @@
|
|
|
4885
4885
|
return hook.checkDCE ? !0 : !1;
|
|
4886
4886
|
})({
|
|
4887
4887
|
bundleType: 1,
|
|
4888
|
-
version: "19.2.
|
|
4888
|
+
version: "19.2.8",
|
|
4889
4889
|
rendererPackageName: "react-server-dom-turbopack",
|
|
4890
4890
|
currentDispatcherRef: ReactSharedInternals,
|
|
4891
|
-
reconcilerVersion: "19.2.
|
|
4891
|
+
reconcilerVersion: "19.2.8",
|
|
4892
4892
|
getCurrentComponentInfo: function () {
|
|
4893
4893
|
return currentOwnerInDEV;
|
|
4894
4894
|
}
|
|
@@ -1395,7 +1395,7 @@
|
|
|
1395
1395
|
erroredTask(request, streamTask, reason),
|
|
1396
1396
|
enqueueFlush(request),
|
|
1397
1397
|
"function" === typeof iterator.throw &&
|
|
1398
|
-
iterator.throw(reason).then(
|
|
1398
|
+
iterator.throw(reason).then(noop, noop));
|
|
1399
1399
|
}
|
|
1400
1400
|
function abortIterable() {
|
|
1401
1401
|
if (0 === streamTask.status) {
|
|
@@ -1409,7 +1409,7 @@
|
|
|
1409
1409
|
: (erroredTask(request, streamTask, signal.reason),
|
|
1410
1410
|
enqueueFlush(request));
|
|
1411
1411
|
"function" === typeof iterator.throw &&
|
|
1412
|
-
iterator.throw(reason).then(
|
|
1412
|
+
iterator.throw(reason).then(noop, noop);
|
|
1413
1413
|
}
|
|
1414
1414
|
}
|
|
1415
1415
|
var isIterator = iterable === iterator,
|
|
@@ -5583,44 +5583,44 @@
|
|
|
5583
5583
|
};
|
|
5584
5584
|
exports.decodeAction = function (body, serverManifest) {
|
|
5585
5585
|
var formData = new FormData(),
|
|
5586
|
-
|
|
5587
|
-
seenActions = new Set();
|
|
5586
|
+
maybeActionKey = null;
|
|
5588
5587
|
body.forEach(function (value, key) {
|
|
5589
5588
|
key.startsWith("$ACTION_")
|
|
5590
5589
|
? key.startsWith("$ACTION_REF_")
|
|
5591
|
-
?
|
|
5592
|
-
|
|
5593
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
5594
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
5595
|
-
(action = loadServerReference(serverManifest, value)))
|
|
5596
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
5597
|
-
!seenActions.has(key) &&
|
|
5598
|
-
(seenActions.add(key),
|
|
5599
|
-
(value = key.slice(11)),
|
|
5600
|
-
(action = loadServerReference(serverManifest, {
|
|
5601
|
-
id: value,
|
|
5602
|
-
bound: null
|
|
5603
|
-
})))
|
|
5590
|
+
? (maybeActionKey = key)
|
|
5591
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
5604
5592
|
: formData.append(key, value);
|
|
5605
5593
|
});
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5594
|
+
if (null === maybeActionKey) return null;
|
|
5595
|
+
var actionKey = maybeActionKey,
|
|
5596
|
+
action = null;
|
|
5597
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
5598
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
5599
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
5600
|
+
(action = loadServerReference(serverManifest, body));
|
|
5601
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
5602
|
+
(body = actionKey.slice(11)),
|
|
5603
|
+
(action = loadServerReference(serverManifest, {
|
|
5604
|
+
id: body,
|
|
5605
|
+
bound: null
|
|
5606
|
+
}));
|
|
5607
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
5608
|
+
return action.then(function (fn) {
|
|
5609
|
+
return fn.bind(null, formData);
|
|
5610
|
+
});
|
|
5611
5611
|
};
|
|
5612
5612
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
5613
5613
|
var keyPath = body.get("$ACTION_KEY");
|
|
5614
5614
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
5615
|
-
var
|
|
5615
|
+
var actionKey = null;
|
|
5616
5616
|
body.forEach(function (value, key) {
|
|
5617
|
-
key.startsWith("$ACTION_REF_") &&
|
|
5618
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
5619
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
5617
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
5620
5618
|
});
|
|
5621
|
-
if (null ===
|
|
5622
|
-
var
|
|
5623
|
-
|
|
5619
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
5620
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
5621
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
5622
|
+
var referenceId = body.id;
|
|
5623
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
5624
5624
|
return null === bound
|
|
5625
5625
|
? null
|
|
5626
5626
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -1052,7 +1052,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
1052
1052
|
erroredTask(request, streamTask, reason),
|
|
1053
1053
|
enqueueFlush(request),
|
|
1054
1054
|
"function" === typeof iterator.throw &&
|
|
1055
|
-
iterator.throw(reason).then(
|
|
1055
|
+
iterator.throw(reason).then(noop, noop));
|
|
1056
1056
|
}
|
|
1057
1057
|
function abortIterable() {
|
|
1058
1058
|
if (0 === streamTask.status) {
|
|
@@ -1066,7 +1066,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
1066
1066
|
: (erroredTask(request, streamTask, signal.reason),
|
|
1067
1067
|
enqueueFlush(request));
|
|
1068
1068
|
"function" === typeof iterator.throw &&
|
|
1069
|
-
iterator.throw(reason).then(
|
|
1069
|
+
iterator.throw(reason).then(noop, noop);
|
|
1070
1070
|
}
|
|
1071
1071
|
}
|
|
1072
1072
|
iterable = iterable === iterator;
|
|
@@ -3385,44 +3385,41 @@ exports.createTemporaryReferenceSet = function () {
|
|
|
3385
3385
|
};
|
|
3386
3386
|
exports.decodeAction = function (body, serverManifest) {
|
|
3387
3387
|
var formData = new FormData(),
|
|
3388
|
-
|
|
3389
|
-
seenActions = new Set();
|
|
3388
|
+
maybeActionKey = null;
|
|
3390
3389
|
body.forEach(function (value, key) {
|
|
3391
3390
|
key.startsWith("$ACTION_")
|
|
3392
3391
|
? key.startsWith("$ACTION_REF_")
|
|
3393
|
-
?
|
|
3394
|
-
|
|
3395
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
3396
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
3397
|
-
(action = loadServerReference(serverManifest, value)))
|
|
3398
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
3399
|
-
!seenActions.has(key) &&
|
|
3400
|
-
(seenActions.add(key),
|
|
3401
|
-
(value = key.slice(11)),
|
|
3402
|
-
(action = loadServerReference(serverManifest, {
|
|
3403
|
-
id: value,
|
|
3404
|
-
bound: null
|
|
3405
|
-
})))
|
|
3392
|
+
? (maybeActionKey = key)
|
|
3393
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
3406
3394
|
: formData.append(key, value);
|
|
3407
3395
|
});
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3396
|
+
if (null === maybeActionKey) return null;
|
|
3397
|
+
var actionKey = maybeActionKey,
|
|
3398
|
+
action = null;
|
|
3399
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
3400
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
3401
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
3402
|
+
(action = loadServerReference(serverManifest, body));
|
|
3403
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
3404
|
+
(body = actionKey.slice(11)),
|
|
3405
|
+
(action = loadServerReference(serverManifest, { id: body, bound: null }));
|
|
3406
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
3407
|
+
return action.then(function (fn) {
|
|
3408
|
+
return fn.bind(null, formData);
|
|
3409
|
+
});
|
|
3413
3410
|
};
|
|
3414
3411
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
3415
3412
|
var keyPath = body.get("$ACTION_KEY");
|
|
3416
3413
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
3417
|
-
var
|
|
3414
|
+
var actionKey = null;
|
|
3418
3415
|
body.forEach(function (value, key) {
|
|
3419
|
-
key.startsWith("$ACTION_REF_") &&
|
|
3420
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
3421
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
3416
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
3422
3417
|
});
|
|
3423
|
-
if (null ===
|
|
3424
|
-
var
|
|
3425
|
-
|
|
3418
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
3419
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
3420
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
3421
|
+
var referenceId = body.id;
|
|
3422
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
3426
3423
|
return null === bound
|
|
3427
3424
|
? null
|
|
3428
3425
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"production" !== process.env.NODE_ENV &&
|
|
13
13
|
(function () {
|
|
14
14
|
function voidHandler() {}
|
|
15
|
+
function noop() {}
|
|
15
16
|
function getIteratorFn(maybeIterable) {
|
|
16
17
|
if (null === maybeIterable || "object" !== typeof maybeIterable)
|
|
17
18
|
return null;
|
|
@@ -514,7 +515,6 @@
|
|
|
514
515
|
temporaryReferences.set(reference, id);
|
|
515
516
|
return reference;
|
|
516
517
|
}
|
|
517
|
-
function noop() {}
|
|
518
518
|
function trackUsedThenable(thenableState, thenable, index) {
|
|
519
519
|
index = thenableState[index];
|
|
520
520
|
void 0 === index
|
|
@@ -1407,7 +1407,7 @@
|
|
|
1407
1407
|
erroredTask(request, streamTask, reason),
|
|
1408
1408
|
enqueueFlush(request),
|
|
1409
1409
|
"function" === typeof iterator.throw &&
|
|
1410
|
-
iterator.throw(reason).then(
|
|
1410
|
+
iterator.throw(reason).then(noop, noop));
|
|
1411
1411
|
}
|
|
1412
1412
|
function abortIterable() {
|
|
1413
1413
|
if (0 === streamTask.status) {
|
|
@@ -1421,7 +1421,7 @@
|
|
|
1421
1421
|
: (erroredTask(request, streamTask, signal.reason),
|
|
1422
1422
|
enqueueFlush(request));
|
|
1423
1423
|
"function" === typeof iterator.throw &&
|
|
1424
|
-
iterator.throw(reason).then(
|
|
1424
|
+
iterator.throw(reason).then(noop, noop);
|
|
1425
1425
|
}
|
|
1426
1426
|
}
|
|
1427
1427
|
var isIterator = iterable === iterator,
|
|
@@ -5666,44 +5666,44 @@
|
|
|
5666
5666
|
};
|
|
5667
5667
|
exports.decodeAction = function (body, serverManifest) {
|
|
5668
5668
|
var formData = new FormData(),
|
|
5669
|
-
|
|
5670
|
-
seenActions = new Set();
|
|
5669
|
+
maybeActionKey = null;
|
|
5671
5670
|
body.forEach(function (value, key) {
|
|
5672
5671
|
key.startsWith("$ACTION_")
|
|
5673
5672
|
? key.startsWith("$ACTION_REF_")
|
|
5674
|
-
?
|
|
5675
|
-
|
|
5676
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
5677
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
5678
|
-
(action = loadServerReference(serverManifest, value)))
|
|
5679
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
5680
|
-
!seenActions.has(key) &&
|
|
5681
|
-
(seenActions.add(key),
|
|
5682
|
-
(value = key.slice(11)),
|
|
5683
|
-
(action = loadServerReference(serverManifest, {
|
|
5684
|
-
id: value,
|
|
5685
|
-
bound: null
|
|
5686
|
-
})))
|
|
5673
|
+
? (maybeActionKey = key)
|
|
5674
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
5687
5675
|
: formData.append(key, value);
|
|
5688
5676
|
});
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5677
|
+
if (null === maybeActionKey) return null;
|
|
5678
|
+
var actionKey = maybeActionKey,
|
|
5679
|
+
action = null;
|
|
5680
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
5681
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
5682
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
5683
|
+
(action = loadServerReference(serverManifest, body));
|
|
5684
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
5685
|
+
(body = actionKey.slice(11)),
|
|
5686
|
+
(action = loadServerReference(serverManifest, {
|
|
5687
|
+
id: body,
|
|
5688
|
+
bound: null
|
|
5689
|
+
}));
|
|
5690
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
5691
|
+
return action.then(function (fn) {
|
|
5692
|
+
return fn.bind(null, formData);
|
|
5693
|
+
});
|
|
5694
5694
|
};
|
|
5695
5695
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
5696
5696
|
var keyPath = body.get("$ACTION_KEY");
|
|
5697
5697
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
5698
|
-
var
|
|
5698
|
+
var actionKey = null;
|
|
5699
5699
|
body.forEach(function (value, key) {
|
|
5700
|
-
key.startsWith("$ACTION_REF_") &&
|
|
5701
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
5702
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
5700
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
5703
5701
|
});
|
|
5704
|
-
if (null ===
|
|
5705
|
-
var
|
|
5706
|
-
|
|
5702
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
5703
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
5704
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
5705
|
+
var referenceId = body.id;
|
|
5706
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
5707
5707
|
return null === bound
|
|
5708
5708
|
? null
|
|
5709
5709
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -5754,7 +5754,7 @@
|
|
|
5754
5754
|
function error(reason) {
|
|
5755
5755
|
reportGlobalError(response$jscomp$0, reason);
|
|
5756
5756
|
"function" === typeof iterator.throw &&
|
|
5757
|
-
iterator.throw(reason).then(
|
|
5757
|
+
iterator.throw(reason).then(noop, noop);
|
|
5758
5758
|
}
|
|
5759
5759
|
var iterator = iterable[ASYNC_ITERATOR](),
|
|
5760
5760
|
response$jscomp$0 = createResponse(
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
"use strict";
|
|
12
12
|
var ReactDOM = require("react-dom"),
|
|
13
|
-
React = require("react")
|
|
14
|
-
|
|
13
|
+
React = require("react");
|
|
14
|
+
function noop() {}
|
|
15
|
+
var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
|
|
15
16
|
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
16
17
|
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
17
18
|
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
@@ -549,7 +550,6 @@ function createTemporaryReference(temporaryReferences, id) {
|
|
|
549
550
|
temporaryReferences.set(reference, id);
|
|
550
551
|
return reference;
|
|
551
552
|
}
|
|
552
|
-
function noop() {}
|
|
553
553
|
var SuspenseException = Error(
|
|
554
554
|
"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."
|
|
555
555
|
);
|
|
@@ -1051,7 +1051,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
1051
1051
|
erroredTask(request, streamTask, reason),
|
|
1052
1052
|
enqueueFlush(request),
|
|
1053
1053
|
"function" === typeof iterator.throw &&
|
|
1054
|
-
iterator.throw(reason).then(
|
|
1054
|
+
iterator.throw(reason).then(noop, noop));
|
|
1055
1055
|
}
|
|
1056
1056
|
function abortIterable() {
|
|
1057
1057
|
if (0 === streamTask.status) {
|
|
@@ -1065,7 +1065,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
1065
1065
|
: (erroredTask(request, streamTask, signal.reason),
|
|
1066
1066
|
enqueueFlush(request));
|
|
1067
1067
|
"function" === typeof iterator.throw &&
|
|
1068
|
-
iterator.throw(reason).then(
|
|
1068
|
+
iterator.throw(reason).then(noop, noop);
|
|
1069
1069
|
}
|
|
1070
1070
|
}
|
|
1071
1071
|
iterable = iterable === iterator;
|
|
@@ -3398,44 +3398,41 @@ exports.createTemporaryReferenceSet = function () {
|
|
|
3398
3398
|
};
|
|
3399
3399
|
exports.decodeAction = function (body, serverManifest) {
|
|
3400
3400
|
var formData = new FormData(),
|
|
3401
|
-
|
|
3402
|
-
seenActions = new Set();
|
|
3401
|
+
maybeActionKey = null;
|
|
3403
3402
|
body.forEach(function (value, key) {
|
|
3404
3403
|
key.startsWith("$ACTION_")
|
|
3405
3404
|
? key.startsWith("$ACTION_REF_")
|
|
3406
|
-
?
|
|
3407
|
-
|
|
3408
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
3409
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
3410
|
-
(action = loadServerReference(serverManifest, value)))
|
|
3411
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
3412
|
-
!seenActions.has(key) &&
|
|
3413
|
-
(seenActions.add(key),
|
|
3414
|
-
(value = key.slice(11)),
|
|
3415
|
-
(action = loadServerReference(serverManifest, {
|
|
3416
|
-
id: value,
|
|
3417
|
-
bound: null
|
|
3418
|
-
})))
|
|
3405
|
+
? (maybeActionKey = key)
|
|
3406
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
3419
3407
|
: formData.append(key, value);
|
|
3420
3408
|
});
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3409
|
+
if (null === maybeActionKey) return null;
|
|
3410
|
+
var actionKey = maybeActionKey,
|
|
3411
|
+
action = null;
|
|
3412
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
3413
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
3414
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
3415
|
+
(action = loadServerReference(serverManifest, body));
|
|
3416
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
3417
|
+
(body = actionKey.slice(11)),
|
|
3418
|
+
(action = loadServerReference(serverManifest, { id: body, bound: null }));
|
|
3419
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
3420
|
+
return action.then(function (fn) {
|
|
3421
|
+
return fn.bind(null, formData);
|
|
3422
|
+
});
|
|
3426
3423
|
};
|
|
3427
3424
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
3428
3425
|
var keyPath = body.get("$ACTION_KEY");
|
|
3429
3426
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
3430
|
-
var
|
|
3427
|
+
var actionKey = null;
|
|
3431
3428
|
body.forEach(function (value, key) {
|
|
3432
|
-
key.startsWith("$ACTION_REF_") &&
|
|
3433
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
3434
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
3429
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
3435
3430
|
});
|
|
3436
|
-
if (null ===
|
|
3437
|
-
var
|
|
3438
|
-
|
|
3431
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
3432
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
3433
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
3434
|
+
var referenceId = body.id;
|
|
3435
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
3439
3436
|
return null === bound
|
|
3440
3437
|
? null
|
|
3441
3438
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -3485,7 +3482,7 @@ exports.decodeReplyFromAsyncIterable = function (
|
|
|
3485
3482
|
function error(reason) {
|
|
3486
3483
|
reportGlobalError(response, reason);
|
|
3487
3484
|
"function" === typeof iterator.throw &&
|
|
3488
|
-
iterator.throw(reason).then(
|
|
3485
|
+
iterator.throw(reason).then(noop, noop);
|
|
3489
3486
|
}
|
|
3490
3487
|
var iterator = iterable[ASYNC_ITERATOR](),
|
|
3491
3488
|
response = createResponse(
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"production" !== process.env.NODE_ENV &&
|
|
13
13
|
(function () {
|
|
14
14
|
function voidHandler() {}
|
|
15
|
+
function noop() {}
|
|
15
16
|
function getIteratorFn(maybeIterable) {
|
|
16
17
|
if (null === maybeIterable || "object" !== typeof maybeIterable)
|
|
17
18
|
return null;
|
|
@@ -573,7 +574,6 @@
|
|
|
573
574
|
temporaryReferences.set(reference, id);
|
|
574
575
|
return reference;
|
|
575
576
|
}
|
|
576
|
-
function noop() {}
|
|
577
577
|
function trackUsedThenable(thenableState, thenable, index) {
|
|
578
578
|
index = thenableState[index];
|
|
579
579
|
void 0 === index
|
|
@@ -1501,7 +1501,7 @@
|
|
|
1501
1501
|
erroredTask(request, streamTask, reason),
|
|
1502
1502
|
enqueueFlush(request),
|
|
1503
1503
|
"function" === typeof iterator.throw &&
|
|
1504
|
-
iterator.throw(reason).then(
|
|
1504
|
+
iterator.throw(reason).then(noop, noop));
|
|
1505
1505
|
}
|
|
1506
1506
|
function abortIterable() {
|
|
1507
1507
|
if (0 === streamTask.status) {
|
|
@@ -1515,7 +1515,7 @@
|
|
|
1515
1515
|
: (erroredTask(request, streamTask, signal.reason),
|
|
1516
1516
|
enqueueFlush(request));
|
|
1517
1517
|
"function" === typeof iterator.throw &&
|
|
1518
|
-
iterator.throw(reason).then(
|
|
1518
|
+
iterator.throw(reason).then(noop, noop);
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
1521
|
var isIterator = iterable === iterator,
|
|
@@ -6292,44 +6292,44 @@
|
|
|
6292
6292
|
};
|
|
6293
6293
|
exports.decodeAction = function (body, serverManifest) {
|
|
6294
6294
|
var formData = new FormData(),
|
|
6295
|
-
|
|
6296
|
-
seenActions = new Set();
|
|
6295
|
+
maybeActionKey = null;
|
|
6297
6296
|
body.forEach(function (value, key) {
|
|
6298
6297
|
key.startsWith("$ACTION_")
|
|
6299
6298
|
? key.startsWith("$ACTION_REF_")
|
|
6300
|
-
?
|
|
6301
|
-
|
|
6302
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
6303
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
6304
|
-
(action = loadServerReference(serverManifest, value)))
|
|
6305
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
6306
|
-
!seenActions.has(key) &&
|
|
6307
|
-
(seenActions.add(key),
|
|
6308
|
-
(value = key.slice(11)),
|
|
6309
|
-
(action = loadServerReference(serverManifest, {
|
|
6310
|
-
id: value,
|
|
6311
|
-
bound: null
|
|
6312
|
-
})))
|
|
6299
|
+
? (maybeActionKey = key)
|
|
6300
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
6313
6301
|
: formData.append(key, value);
|
|
6314
6302
|
});
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6303
|
+
if (null === maybeActionKey) return null;
|
|
6304
|
+
var actionKey = maybeActionKey,
|
|
6305
|
+
action = null;
|
|
6306
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
6307
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
6308
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
6309
|
+
(action = loadServerReference(serverManifest, body));
|
|
6310
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
6311
|
+
(body = actionKey.slice(11)),
|
|
6312
|
+
(action = loadServerReference(serverManifest, {
|
|
6313
|
+
id: body,
|
|
6314
|
+
bound: null
|
|
6315
|
+
}));
|
|
6316
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
6317
|
+
return action.then(function (fn) {
|
|
6318
|
+
return fn.bind(null, formData);
|
|
6319
|
+
});
|
|
6320
6320
|
};
|
|
6321
6321
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
6322
6322
|
var keyPath = body.get("$ACTION_KEY");
|
|
6323
6323
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
6324
|
-
var
|
|
6324
|
+
var actionKey = null;
|
|
6325
6325
|
body.forEach(function (value, key) {
|
|
6326
|
-
key.startsWith("$ACTION_REF_") &&
|
|
6327
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
6328
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
6326
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
6329
6327
|
});
|
|
6330
|
-
if (null ===
|
|
6331
|
-
var
|
|
6332
|
-
|
|
6328
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
6329
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
6330
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
6331
|
+
var referenceId = body.id;
|
|
6332
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
6333
6333
|
return null === bound
|
|
6334
6334
|
? null
|
|
6335
6335
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -6372,7 +6372,7 @@
|
|
|
6372
6372
|
function error(reason) {
|
|
6373
6373
|
reportGlobalError(response, reason);
|
|
6374
6374
|
"function" === typeof iterator.throw &&
|
|
6375
|
-
iterator.throw(reason).then(
|
|
6375
|
+
iterator.throw(reason).then(noop, noop);
|
|
6376
6376
|
}
|
|
6377
6377
|
var iterator = iterable[ASYNC_ITERATOR](),
|
|
6378
6378
|
response = createResponse(
|
|
@@ -14,8 +14,9 @@ var stream = require("stream"),
|
|
|
14
14
|
require("crypto");
|
|
15
15
|
var async_hooks = require("async_hooks"),
|
|
16
16
|
ReactDOM = require("react-dom"),
|
|
17
|
-
React = require("react")
|
|
18
|
-
|
|
17
|
+
React = require("react");
|
|
18
|
+
function noop() {}
|
|
19
|
+
var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
|
|
19
20
|
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
20
21
|
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
21
22
|
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
@@ -575,7 +576,6 @@ function createTemporaryReference(temporaryReferences, id) {
|
|
|
575
576
|
temporaryReferences.set(reference, id);
|
|
576
577
|
return reference;
|
|
577
578
|
}
|
|
578
|
-
function noop() {}
|
|
579
579
|
var SuspenseException = Error(
|
|
580
580
|
"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."
|
|
581
581
|
);
|
|
@@ -1074,7 +1074,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
1074
1074
|
erroredTask(request, streamTask, reason),
|
|
1075
1075
|
enqueueFlush(request),
|
|
1076
1076
|
"function" === typeof iterator.throw &&
|
|
1077
|
-
iterator.throw(reason).then(
|
|
1077
|
+
iterator.throw(reason).then(noop, noop));
|
|
1078
1078
|
}
|
|
1079
1079
|
function abortIterable() {
|
|
1080
1080
|
if (0 === streamTask.status) {
|
|
@@ -1088,7 +1088,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
1088
1088
|
: (erroredTask(request, streamTask, signal.reason),
|
|
1089
1089
|
enqueueFlush(request));
|
|
1090
1090
|
"function" === typeof iterator.throw &&
|
|
1091
|
-
iterator.throw(reason).then(
|
|
1091
|
+
iterator.throw(reason).then(noop, noop);
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
1094
|
iterable = iterable === iterator;
|
|
@@ -3478,44 +3478,41 @@ exports.createTemporaryReferenceSet = function () {
|
|
|
3478
3478
|
};
|
|
3479
3479
|
exports.decodeAction = function (body, serverManifest) {
|
|
3480
3480
|
var formData = new FormData(),
|
|
3481
|
-
|
|
3482
|
-
seenActions = new Set();
|
|
3481
|
+
maybeActionKey = null;
|
|
3483
3482
|
body.forEach(function (value, key) {
|
|
3484
3483
|
key.startsWith("$ACTION_")
|
|
3485
3484
|
? key.startsWith("$ACTION_REF_")
|
|
3486
|
-
?
|
|
3487
|
-
|
|
3488
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
3489
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
3490
|
-
(action = loadServerReference(serverManifest, value)))
|
|
3491
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
3492
|
-
!seenActions.has(key) &&
|
|
3493
|
-
(seenActions.add(key),
|
|
3494
|
-
(value = key.slice(11)),
|
|
3495
|
-
(action = loadServerReference(serverManifest, {
|
|
3496
|
-
id: value,
|
|
3497
|
-
bound: null
|
|
3498
|
-
})))
|
|
3485
|
+
? (maybeActionKey = key)
|
|
3486
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
3499
3487
|
: formData.append(key, value);
|
|
3500
3488
|
});
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3489
|
+
if (null === maybeActionKey) return null;
|
|
3490
|
+
var actionKey = maybeActionKey,
|
|
3491
|
+
action = null;
|
|
3492
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
3493
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
3494
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
3495
|
+
(action = loadServerReference(serverManifest, body));
|
|
3496
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
3497
|
+
(body = actionKey.slice(11)),
|
|
3498
|
+
(action = loadServerReference(serverManifest, { id: body, bound: null }));
|
|
3499
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
3500
|
+
return action.then(function (fn) {
|
|
3501
|
+
return fn.bind(null, formData);
|
|
3502
|
+
});
|
|
3506
3503
|
};
|
|
3507
3504
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
3508
3505
|
var keyPath = body.get("$ACTION_KEY");
|
|
3509
3506
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
3510
|
-
var
|
|
3507
|
+
var actionKey = null;
|
|
3511
3508
|
body.forEach(function (value, key) {
|
|
3512
|
-
key.startsWith("$ACTION_REF_") &&
|
|
3513
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
3514
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
3509
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
3515
3510
|
});
|
|
3516
|
-
if (null ===
|
|
3517
|
-
var
|
|
3518
|
-
|
|
3511
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
3512
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
3513
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
3514
|
+
var referenceId = body.id;
|
|
3515
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
3519
3516
|
return null === bound
|
|
3520
3517
|
? null
|
|
3521
3518
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -3558,7 +3555,7 @@ exports.decodeReplyFromAsyncIterable = function (
|
|
|
3558
3555
|
function error(reason) {
|
|
3559
3556
|
reportGlobalError(response, reason);
|
|
3560
3557
|
"function" === typeof iterator.throw &&
|
|
3561
|
-
iterator.throw(reason).then(
|
|
3558
|
+
iterator.throw(reason).then(noop, noop);
|
|
3562
3559
|
}
|
|
3563
3560
|
var iterator = iterable[ASYNC_ITERATOR](),
|
|
3564
3561
|
response = createResponse(
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-server-dom-turbopack",
|
|
3
3
|
"description": "React Server Components bindings for DOM using Turbopack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.",
|
|
4
|
-
"version": "19.2.
|
|
4
|
+
"version": "19.2.8",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react"
|
|
7
7
|
],
|
|
8
8
|
"homepage": "https://react.dev/",
|
|
9
|
-
"bugs": "https://github.com/
|
|
9
|
+
"bugs": "https://github.com/react/react/issues",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"files": [
|
|
12
12
|
"LICENSE",
|
|
@@ -71,15 +71,15 @@
|
|
|
71
71
|
"main": "index.js",
|
|
72
72
|
"repository": {
|
|
73
73
|
"type": "git",
|
|
74
|
-
"url": "https://github.com/
|
|
74
|
+
"url": "https://github.com/react/react.git",
|
|
75
75
|
"directory": "packages/react-server-dom-turbopack"
|
|
76
76
|
},
|
|
77
77
|
"engines": {
|
|
78
78
|
"node": ">=0.10.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"react": "^19.2.
|
|
82
|
-
"react-dom": "^19.2.
|
|
81
|
+
"react": "^19.2.8",
|
|
82
|
+
"react-dom": "^19.2.8"
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"acorn-loose": "^8.3.0",
|