react-server-dom-webpack 19.0.0-beta-1beb73de0f-20240503 → 19.0.0-beta-b498834eab-20240506
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-webpack-client.browser.development.js +14 -16
- package/cjs/react-server-dom-webpack-client.browser.production.js +9 -14
- package/cjs/react-server-dom-webpack-client.edge.development.js +14 -16
- package/cjs/react-server-dom-webpack-client.edge.production.js +9 -14
- package/cjs/react-server-dom-webpack-client.node.development.js +14 -16
- package/cjs/react-server-dom-webpack-client.node.production.js +9 -14
- package/cjs/react-server-dom-webpack-client.node.unbundled.development.js +14 -16
- package/cjs/react-server-dom-webpack-client.node.unbundled.production.js +9 -14
- package/cjs/react-server-dom-webpack-server.browser.development.js +32 -23
- package/cjs/react-server-dom-webpack-server.browser.production.js +1 -0
- package/cjs/react-server-dom-webpack-server.edge.development.js +41 -24
- package/cjs/react-server-dom-webpack-server.edge.production.js +1 -0
- package/cjs/react-server-dom-webpack-server.node.development.js +39 -24
- package/cjs/react-server-dom-webpack-server.node.production.js +1 -0
- package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +39 -24
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.js +1 -0
- package/package.json +3 -3
@@ -965,12 +965,12 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
965
965
|
// While the first promise resolved, its value isn't necessarily what we'll
|
966
966
|
// resolve into because we might suspend again.
|
967
967
|
try {
|
968
|
-
var
|
968
|
+
var _partJSON2 = JSON.stringify(value, resolveToJSON); // $FlowFixMe[incompatible-type] We know it's not null because we assigned it above.
|
969
969
|
|
970
970
|
|
971
971
|
var _data = formData; // eslint-disable-next-line react-internal/safe-string-coercion
|
972
972
|
|
973
|
-
_data.append(formFieldPrefix + _lazyId,
|
973
|
+
_data.append(formFieldPrefix + _lazyId, _partJSON2);
|
974
974
|
|
975
975
|
pendingParts--;
|
976
976
|
|
@@ -1011,12 +1011,12 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
1011
1011
|
|
1012
1012
|
_thenable.then(function (partValue) {
|
1013
1013
|
try {
|
1014
|
-
var
|
1014
|
+
var _partJSON3 = JSON.stringify(partValue, resolveToJSON); // $FlowFixMe[incompatible-type] We know it's not null because we assigned it above.
|
1015
1015
|
|
1016
1016
|
|
1017
1017
|
var _data2 = formData; // eslint-disable-next-line react-internal/safe-string-coercion
|
1018
1018
|
|
1019
|
-
_data2.append(formFieldPrefix + promiseId,
|
1019
|
+
_data2.append(formFieldPrefix + promiseId, _partJSON3);
|
1020
1020
|
|
1021
1021
|
pendingParts--;
|
1022
1022
|
|
@@ -1026,11 +1026,9 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
1026
1026
|
} catch (reason) {
|
1027
1027
|
reject(reason);
|
1028
1028
|
}
|
1029
|
-
},
|
1030
|
-
|
1031
|
-
|
1032
|
-
reject(reason);
|
1033
|
-
});
|
1029
|
+
}, // In the future we could consider serializing this as an error
|
1030
|
+
// that throws on the server instead.
|
1031
|
+
reject);
|
1034
1032
|
|
1035
1033
|
return serializePromiseID(promiseId);
|
1036
1034
|
}
|
@@ -1061,26 +1059,26 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
1061
1059
|
}
|
1062
1060
|
|
1063
1061
|
if (value instanceof Map) {
|
1064
|
-
var
|
1062
|
+
var _partJSON4 = JSON.stringify(Array.from(value), resolveToJSON);
|
1065
1063
|
|
1066
1064
|
if (formData === null) {
|
1067
1065
|
formData = new FormData();
|
1068
1066
|
}
|
1069
1067
|
|
1070
1068
|
var mapId = nextPartId++;
|
1071
|
-
formData.append(formFieldPrefix + mapId,
|
1069
|
+
formData.append(formFieldPrefix + mapId, _partJSON4);
|
1072
1070
|
return serializeMapID(mapId);
|
1073
1071
|
}
|
1074
1072
|
|
1075
1073
|
if (value instanceof Set) {
|
1076
|
-
var
|
1074
|
+
var _partJSON5 = JSON.stringify(Array.from(value), resolveToJSON);
|
1077
1075
|
|
1078
1076
|
if (formData === null) {
|
1079
1077
|
formData = new FormData();
|
1080
1078
|
}
|
1081
1079
|
|
1082
1080
|
var setId = nextPartId++;
|
1083
|
-
formData.append(formFieldPrefix + setId,
|
1081
|
+
formData.append(formFieldPrefix + setId, _partJSON5);
|
1084
1082
|
return serializeSetID(setId);
|
1085
1083
|
}
|
1086
1084
|
|
@@ -1091,19 +1089,19 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
1091
1089
|
|
1092
1090
|
if (iterator === value) {
|
1093
1091
|
// Iterator, not Iterable
|
1094
|
-
var
|
1092
|
+
var _partJSON6 = JSON.stringify(Array.from(iterator), resolveToJSON);
|
1095
1093
|
|
1096
1094
|
if (formData === null) {
|
1097
1095
|
formData = new FormData();
|
1098
1096
|
}
|
1099
1097
|
|
1100
1098
|
var iteratorId = nextPartId++;
|
1101
|
-
formData.append(formFieldPrefix + iteratorId,
|
1099
|
+
formData.append(formFieldPrefix + iteratorId, _partJSON6);
|
1102
1100
|
return serializeIteratorID(iteratorId);
|
1103
1101
|
}
|
1104
1102
|
|
1105
1103
|
return Array.from(iterator);
|
1106
|
-
}
|
1104
|
+
}
|
1107
1105
|
|
1108
1106
|
|
1109
1107
|
var proto = getPrototypeOf(value);
|
@@ -177,22 +177,17 @@ function processReply(
|
|
177
177
|
null === formData && (formData = new FormData());
|
178
178
|
pendingParts++;
|
179
179
|
var promiseId = nextPartId++;
|
180
|
-
value.then(
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
} catch (reason) {
|
189
|
-
reject(reason);
|
190
|
-
}
|
191
|
-
},
|
192
|
-
function (reason) {
|
180
|
+
value.then(function (partValue) {
|
181
|
+
try {
|
182
|
+
var partJSON$25 = JSON.stringify(partValue, resolveToJSON);
|
183
|
+
partValue = formData;
|
184
|
+
partValue.append(formFieldPrefix + promiseId, partJSON$25);
|
185
|
+
pendingParts--;
|
186
|
+
0 === pendingParts && resolve(partValue);
|
187
|
+
} catch (reason) {
|
193
188
|
reject(reason);
|
194
189
|
}
|
195
|
-
);
|
190
|
+
}, reject);
|
196
191
|
return "$@" + promiseId.toString(16);
|
197
192
|
}
|
198
193
|
if (isArrayImpl(value)) return value;
|
@@ -984,12 +984,12 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
984
984
|
// While the first promise resolved, its value isn't necessarily what we'll
|
985
985
|
// resolve into because we might suspend again.
|
986
986
|
try {
|
987
|
-
var
|
987
|
+
var _partJSON2 = JSON.stringify(value, resolveToJSON); // $FlowFixMe[incompatible-type] We know it's not null because we assigned it above.
|
988
988
|
|
989
989
|
|
990
990
|
var _data = formData; // eslint-disable-next-line react-internal/safe-string-coercion
|
991
991
|
|
992
|
-
_data.append(formFieldPrefix + _lazyId,
|
992
|
+
_data.append(formFieldPrefix + _lazyId, _partJSON2);
|
993
993
|
|
994
994
|
pendingParts--;
|
995
995
|
|
@@ -1030,12 +1030,12 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
1030
1030
|
|
1031
1031
|
_thenable.then(function (partValue) {
|
1032
1032
|
try {
|
1033
|
-
var
|
1033
|
+
var _partJSON3 = JSON.stringify(partValue, resolveToJSON); // $FlowFixMe[incompatible-type] We know it's not null because we assigned it above.
|
1034
1034
|
|
1035
1035
|
|
1036
1036
|
var _data2 = formData; // eslint-disable-next-line react-internal/safe-string-coercion
|
1037
1037
|
|
1038
|
-
_data2.append(formFieldPrefix + promiseId,
|
1038
|
+
_data2.append(formFieldPrefix + promiseId, _partJSON3);
|
1039
1039
|
|
1040
1040
|
pendingParts--;
|
1041
1041
|
|
@@ -1045,11 +1045,9 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
1045
1045
|
} catch (reason) {
|
1046
1046
|
reject(reason);
|
1047
1047
|
}
|
1048
|
-
},
|
1049
|
-
|
1050
|
-
|
1051
|
-
reject(reason);
|
1052
|
-
});
|
1048
|
+
}, // In the future we could consider serializing this as an error
|
1049
|
+
// that throws on the server instead.
|
1050
|
+
reject);
|
1053
1051
|
|
1054
1052
|
return serializePromiseID(promiseId);
|
1055
1053
|
}
|
@@ -1080,26 +1078,26 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
1080
1078
|
}
|
1081
1079
|
|
1082
1080
|
if (value instanceof Map) {
|
1083
|
-
var
|
1081
|
+
var _partJSON4 = JSON.stringify(Array.from(value), resolveToJSON);
|
1084
1082
|
|
1085
1083
|
if (formData === null) {
|
1086
1084
|
formData = new FormData();
|
1087
1085
|
}
|
1088
1086
|
|
1089
1087
|
var mapId = nextPartId++;
|
1090
|
-
formData.append(formFieldPrefix + mapId,
|
1088
|
+
formData.append(formFieldPrefix + mapId, _partJSON4);
|
1091
1089
|
return serializeMapID(mapId);
|
1092
1090
|
}
|
1093
1091
|
|
1094
1092
|
if (value instanceof Set) {
|
1095
|
-
var
|
1093
|
+
var _partJSON5 = JSON.stringify(Array.from(value), resolveToJSON);
|
1096
1094
|
|
1097
1095
|
if (formData === null) {
|
1098
1096
|
formData = new FormData();
|
1099
1097
|
}
|
1100
1098
|
|
1101
1099
|
var setId = nextPartId++;
|
1102
|
-
formData.append(formFieldPrefix + setId,
|
1100
|
+
formData.append(formFieldPrefix + setId, _partJSON5);
|
1103
1101
|
return serializeSetID(setId);
|
1104
1102
|
}
|
1105
1103
|
|
@@ -1110,19 +1108,19 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
1110
1108
|
|
1111
1109
|
if (iterator === value) {
|
1112
1110
|
// Iterator, not Iterable
|
1113
|
-
var
|
1111
|
+
var _partJSON6 = JSON.stringify(Array.from(iterator), resolveToJSON);
|
1114
1112
|
|
1115
1113
|
if (formData === null) {
|
1116
1114
|
formData = new FormData();
|
1117
1115
|
}
|
1118
1116
|
|
1119
1117
|
var iteratorId = nextPartId++;
|
1120
|
-
formData.append(formFieldPrefix + iteratorId,
|
1118
|
+
formData.append(formFieldPrefix + iteratorId, _partJSON6);
|
1121
1119
|
return serializeIteratorID(iteratorId);
|
1122
1120
|
}
|
1123
1121
|
|
1124
1122
|
return Array.from(iterator);
|
1125
|
-
}
|
1123
|
+
}
|
1126
1124
|
|
1127
1125
|
|
1128
1126
|
var proto = getPrototypeOf(value);
|
@@ -189,22 +189,17 @@ function processReply(
|
|
189
189
|
null === formData && (formData = new FormData());
|
190
190
|
pendingParts++;
|
191
191
|
var promiseId = nextPartId++;
|
192
|
-
value.then(
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
} catch (reason) {
|
201
|
-
reject(reason);
|
202
|
-
}
|
203
|
-
},
|
204
|
-
function (reason) {
|
192
|
+
value.then(function (partValue) {
|
193
|
+
try {
|
194
|
+
var partJSON$25 = JSON.stringify(partValue, resolveToJSON);
|
195
|
+
partValue = formData;
|
196
|
+
partValue.append(formFieldPrefix + promiseId, partJSON$25);
|
197
|
+
pendingParts--;
|
198
|
+
0 === pendingParts && resolve(partValue);
|
199
|
+
} catch (reason) {
|
205
200
|
reject(reason);
|
206
201
|
}
|
207
|
-
);
|
202
|
+
}, reject);
|
208
203
|
return "$@" + promiseId.toString(16);
|
209
204
|
}
|
210
205
|
if (isArrayImpl(value)) return value;
|
@@ -982,12 +982,12 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
982
982
|
// While the first promise resolved, its value isn't necessarily what we'll
|
983
983
|
// resolve into because we might suspend again.
|
984
984
|
try {
|
985
|
-
var
|
985
|
+
var _partJSON2 = JSON.stringify(value, resolveToJSON); // $FlowFixMe[incompatible-type] We know it's not null because we assigned it above.
|
986
986
|
|
987
987
|
|
988
988
|
var _data = formData; // eslint-disable-next-line react-internal/safe-string-coercion
|
989
989
|
|
990
|
-
_data.append(formFieldPrefix + _lazyId,
|
990
|
+
_data.append(formFieldPrefix + _lazyId, _partJSON2);
|
991
991
|
|
992
992
|
pendingParts--;
|
993
993
|
|
@@ -1028,12 +1028,12 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
1028
1028
|
|
1029
1029
|
_thenable.then(function (partValue) {
|
1030
1030
|
try {
|
1031
|
-
var
|
1031
|
+
var _partJSON3 = JSON.stringify(partValue, resolveToJSON); // $FlowFixMe[incompatible-type] We know it's not null because we assigned it above.
|
1032
1032
|
|
1033
1033
|
|
1034
1034
|
var _data2 = formData; // eslint-disable-next-line react-internal/safe-string-coercion
|
1035
1035
|
|
1036
|
-
_data2.append(formFieldPrefix + promiseId,
|
1036
|
+
_data2.append(formFieldPrefix + promiseId, _partJSON3);
|
1037
1037
|
|
1038
1038
|
pendingParts--;
|
1039
1039
|
|
@@ -1043,11 +1043,9 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
1043
1043
|
} catch (reason) {
|
1044
1044
|
reject(reason);
|
1045
1045
|
}
|
1046
|
-
},
|
1047
|
-
|
1048
|
-
|
1049
|
-
reject(reason);
|
1050
|
-
});
|
1046
|
+
}, // In the future we could consider serializing this as an error
|
1047
|
+
// that throws on the server instead.
|
1048
|
+
reject);
|
1051
1049
|
|
1052
1050
|
return serializePromiseID(promiseId);
|
1053
1051
|
}
|
@@ -1078,26 +1076,26 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
1078
1076
|
}
|
1079
1077
|
|
1080
1078
|
if (value instanceof Map) {
|
1081
|
-
var
|
1079
|
+
var _partJSON4 = JSON.stringify(Array.from(value), resolveToJSON);
|
1082
1080
|
|
1083
1081
|
if (formData === null) {
|
1084
1082
|
formData = new FormData();
|
1085
1083
|
}
|
1086
1084
|
|
1087
1085
|
var mapId = nextPartId++;
|
1088
|
-
formData.append(formFieldPrefix + mapId,
|
1086
|
+
formData.append(formFieldPrefix + mapId, _partJSON4);
|
1089
1087
|
return serializeMapID(mapId);
|
1090
1088
|
}
|
1091
1089
|
|
1092
1090
|
if (value instanceof Set) {
|
1093
|
-
var
|
1091
|
+
var _partJSON5 = JSON.stringify(Array.from(value), resolveToJSON);
|
1094
1092
|
|
1095
1093
|
if (formData === null) {
|
1096
1094
|
formData = new FormData();
|
1097
1095
|
}
|
1098
1096
|
|
1099
1097
|
var setId = nextPartId++;
|
1100
|
-
formData.append(formFieldPrefix + setId,
|
1098
|
+
formData.append(formFieldPrefix + setId, _partJSON5);
|
1101
1099
|
return serializeSetID(setId);
|
1102
1100
|
}
|
1103
1101
|
|
@@ -1108,19 +1106,19 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
1108
1106
|
|
1109
1107
|
if (iterator === value) {
|
1110
1108
|
// Iterator, not Iterable
|
1111
|
-
var
|
1109
|
+
var _partJSON6 = JSON.stringify(Array.from(iterator), resolveToJSON);
|
1112
1110
|
|
1113
1111
|
if (formData === null) {
|
1114
1112
|
formData = new FormData();
|
1115
1113
|
}
|
1116
1114
|
|
1117
1115
|
var iteratorId = nextPartId++;
|
1118
|
-
formData.append(formFieldPrefix + iteratorId,
|
1116
|
+
formData.append(formFieldPrefix + iteratorId, _partJSON6);
|
1119
1117
|
return serializeIteratorID(iteratorId);
|
1120
1118
|
}
|
1121
1119
|
|
1122
1120
|
return Array.from(iterator);
|
1123
|
-
}
|
1121
|
+
}
|
1124
1122
|
|
1125
1123
|
|
1126
1124
|
var proto = getPrototypeOf(value);
|
@@ -190,22 +190,17 @@ function processReply(
|
|
190
190
|
null === formData && (formData = new FormData());
|
191
191
|
pendingParts++;
|
192
192
|
var promiseId = nextPartId++;
|
193
|
-
value.then(
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
} catch (reason) {
|
202
|
-
reject(reason);
|
203
|
-
}
|
204
|
-
},
|
205
|
-
function (reason) {
|
193
|
+
value.then(function (partValue) {
|
194
|
+
try {
|
195
|
+
var partJSON$25 = JSON.stringify(partValue, resolveToJSON);
|
196
|
+
partValue = formData;
|
197
|
+
partValue.append(formFieldPrefix + promiseId, partJSON$25);
|
198
|
+
pendingParts--;
|
199
|
+
0 === pendingParts && resolve(partValue);
|
200
|
+
} catch (reason) {
|
206
201
|
reject(reason);
|
207
202
|
}
|
208
|
-
);
|
203
|
+
}, reject);
|
209
204
|
return "$@" + promiseId.toString(16);
|
210
205
|
}
|
211
206
|
if (isArrayImpl(value)) return value;
|
@@ -935,12 +935,12 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
935
935
|
// While the first promise resolved, its value isn't necessarily what we'll
|
936
936
|
// resolve into because we might suspend again.
|
937
937
|
try {
|
938
|
-
var
|
938
|
+
var _partJSON2 = JSON.stringify(value, resolveToJSON); // $FlowFixMe[incompatible-type] We know it's not null because we assigned it above.
|
939
939
|
|
940
940
|
|
941
941
|
var _data = formData; // eslint-disable-next-line react-internal/safe-string-coercion
|
942
942
|
|
943
|
-
_data.append(formFieldPrefix + _lazyId,
|
943
|
+
_data.append(formFieldPrefix + _lazyId, _partJSON2);
|
944
944
|
|
945
945
|
pendingParts--;
|
946
946
|
|
@@ -981,12 +981,12 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
981
981
|
|
982
982
|
_thenable.then(function (partValue) {
|
983
983
|
try {
|
984
|
-
var
|
984
|
+
var _partJSON3 = JSON.stringify(partValue, resolveToJSON); // $FlowFixMe[incompatible-type] We know it's not null because we assigned it above.
|
985
985
|
|
986
986
|
|
987
987
|
var _data2 = formData; // eslint-disable-next-line react-internal/safe-string-coercion
|
988
988
|
|
989
|
-
_data2.append(formFieldPrefix + promiseId,
|
989
|
+
_data2.append(formFieldPrefix + promiseId, _partJSON3);
|
990
990
|
|
991
991
|
pendingParts--;
|
992
992
|
|
@@ -996,11 +996,9 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
996
996
|
} catch (reason) {
|
997
997
|
reject(reason);
|
998
998
|
}
|
999
|
-
},
|
1000
|
-
|
1001
|
-
|
1002
|
-
reject(reason);
|
1003
|
-
});
|
999
|
+
}, // In the future we could consider serializing this as an error
|
1000
|
+
// that throws on the server instead.
|
1001
|
+
reject);
|
1004
1002
|
|
1005
1003
|
return serializePromiseID(promiseId);
|
1006
1004
|
}
|
@@ -1031,26 +1029,26 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
1031
1029
|
}
|
1032
1030
|
|
1033
1031
|
if (value instanceof Map) {
|
1034
|
-
var
|
1032
|
+
var _partJSON4 = JSON.stringify(Array.from(value), resolveToJSON);
|
1035
1033
|
|
1036
1034
|
if (formData === null) {
|
1037
1035
|
formData = new FormData();
|
1038
1036
|
}
|
1039
1037
|
|
1040
1038
|
var mapId = nextPartId++;
|
1041
|
-
formData.append(formFieldPrefix + mapId,
|
1039
|
+
formData.append(formFieldPrefix + mapId, _partJSON4);
|
1042
1040
|
return serializeMapID(mapId);
|
1043
1041
|
}
|
1044
1042
|
|
1045
1043
|
if (value instanceof Set) {
|
1046
|
-
var
|
1044
|
+
var _partJSON5 = JSON.stringify(Array.from(value), resolveToJSON);
|
1047
1045
|
|
1048
1046
|
if (formData === null) {
|
1049
1047
|
formData = new FormData();
|
1050
1048
|
}
|
1051
1049
|
|
1052
1050
|
var setId = nextPartId++;
|
1053
|
-
formData.append(formFieldPrefix + setId,
|
1051
|
+
formData.append(formFieldPrefix + setId, _partJSON5);
|
1054
1052
|
return serializeSetID(setId);
|
1055
1053
|
}
|
1056
1054
|
|
@@ -1061,19 +1059,19 @@ function processReply(root, formFieldPrefix, temporaryReferences, resolve, rejec
|
|
1061
1059
|
|
1062
1060
|
if (iterator === value) {
|
1063
1061
|
// Iterator, not Iterable
|
1064
|
-
var
|
1062
|
+
var _partJSON6 = JSON.stringify(Array.from(iterator), resolveToJSON);
|
1065
1063
|
|
1066
1064
|
if (formData === null) {
|
1067
1065
|
formData = new FormData();
|
1068
1066
|
}
|
1069
1067
|
|
1070
1068
|
var iteratorId = nextPartId++;
|
1071
|
-
formData.append(formFieldPrefix + iteratorId,
|
1069
|
+
formData.append(formFieldPrefix + iteratorId, _partJSON6);
|
1072
1070
|
return serializeIteratorID(iteratorId);
|
1073
1071
|
}
|
1074
1072
|
|
1075
1073
|
return Array.from(iterator);
|
1076
|
-
}
|
1074
|
+
}
|
1077
1075
|
|
1078
1076
|
|
1079
1077
|
var proto = getPrototypeOf(value);
|
@@ -173,22 +173,17 @@ function processReply(
|
|
173
173
|
null === formData && (formData = new FormData());
|
174
174
|
pendingParts++;
|
175
175
|
var promiseId = nextPartId++;
|
176
|
-
value.then(
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
} catch (reason) {
|
185
|
-
reject(reason);
|
186
|
-
}
|
187
|
-
},
|
188
|
-
function (reason) {
|
176
|
+
value.then(function (partValue) {
|
177
|
+
try {
|
178
|
+
var partJSON$25 = JSON.stringify(partValue, resolveToJSON);
|
179
|
+
partValue = formData;
|
180
|
+
partValue.append(formFieldPrefix + promiseId, partJSON$25);
|
181
|
+
pendingParts--;
|
182
|
+
0 === pendingParts && resolve(partValue);
|
183
|
+
} catch (reason) {
|
189
184
|
reject(reason);
|
190
185
|
}
|
191
|
-
);
|
186
|
+
}, reject);
|
192
187
|
return "$@" + promiseId.toString(16);
|
193
188
|
}
|
194
189
|
if (isArrayImpl(value)) return value;
|
@@ -765,6 +765,8 @@ function createHints() {
|
|
765
765
|
|
766
766
|
var supportsRequestStorage = false;
|
767
767
|
var requestStorage = null;
|
768
|
+
var supportsComponentStorage = false;
|
769
|
+
var componentStorage = null;
|
768
770
|
|
769
771
|
var TEMPORARY_REFERENCE_TAG = Symbol.for('react.temporary.reference'); // eslint-disable-next-line no-unused-vars
|
770
772
|
|
@@ -1111,6 +1113,16 @@ function use(usable) {
|
|
1111
1113
|
}
|
1112
1114
|
}
|
1113
1115
|
|
1116
|
+
var currentOwner = null;
|
1117
|
+
function setCurrentOwner(componentInfo) {
|
1118
|
+
currentOwner = componentInfo;
|
1119
|
+
}
|
1120
|
+
function resolveOwner() {
|
1121
|
+
if (currentOwner) return currentOwner;
|
1122
|
+
|
1123
|
+
return null;
|
1124
|
+
}
|
1125
|
+
|
1114
1126
|
function resolveCache() {
|
1115
1127
|
var request = resolveRequest();
|
1116
1128
|
|
@@ -1135,16 +1147,9 @@ var DefaultAsyncDispatcher = {
|
|
1135
1147
|
return entry;
|
1136
1148
|
}
|
1137
1149
|
};
|
1138
|
-
var currentOwner = null;
|
1139
1150
|
|
1140
1151
|
{
|
1141
|
-
DefaultAsyncDispatcher.getOwner =
|
1142
|
-
return currentOwner;
|
1143
|
-
};
|
1144
|
-
}
|
1145
|
-
|
1146
|
-
function setCurrentOwner(componentInfo) {
|
1147
|
-
currentOwner = componentInfo;
|
1152
|
+
DefaultAsyncDispatcher.getOwner = resolveOwner;
|
1148
1153
|
}
|
1149
1154
|
|
1150
1155
|
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
|
@@ -1722,8 +1727,11 @@ function renderFunctionComponent(request, task, key, Component, props, owner) {
|
|
1722
1727
|
// component suspends we can reuse the same task object. If the same
|
1723
1728
|
// component suspends again, the thenable state will be restored.
|
1724
1729
|
var prevThenableState = task.thenableState;
|
1725
|
-
task.thenableState = null;
|
1726
|
-
|
1730
|
+
task.thenableState = null; // The secondArg is always undefined in Server Components since refs error early.
|
1731
|
+
|
1732
|
+
var secondArg = undefined;
|
1733
|
+
var result;
|
1734
|
+
var componentDebugInfo;
|
1727
1735
|
|
1728
1736
|
{
|
1729
1737
|
if (debugID === null) {
|
@@ -1751,18 +1759,14 @@ function renderFunctionComponent(request, task, key, Component, props, owner) {
|
|
1751
1759
|
outlineModel(request, componentDebugInfo);
|
1752
1760
|
emitDebugChunk(request, componentDebugID, componentDebugInfo);
|
1753
1761
|
}
|
1754
|
-
}
|
1755
|
-
|
1756
|
-
prepareToUseHooksForComponent(prevThenableState, componentDebugInfo); // The secondArg is always undefined in Server Components since refs error early.
|
1757
|
-
|
1758
|
-
var secondArg = undefined;
|
1759
|
-
var result;
|
1760
1762
|
|
1761
|
-
|
1763
|
+
prepareToUseHooksForComponent(prevThenableState, componentDebugInfo);
|
1762
1764
|
setCurrentOwner(componentDebugInfo);
|
1763
1765
|
|
1764
1766
|
try {
|
1765
|
-
|
1767
|
+
if (supportsComponentStorage) ; else {
|
1768
|
+
result = Component(props, secondArg);
|
1769
|
+
}
|
1766
1770
|
} finally {
|
1767
1771
|
setCurrentOwner(null);
|
1768
1772
|
}
|
@@ -3535,7 +3539,6 @@ function loadChunk(chunkId, filename) {
|
|
3535
3539
|
return __webpack_chunk_load__(chunkId);
|
3536
3540
|
}
|
3537
3541
|
|
3538
|
-
// The server acts as a Client of itself when resolving Server References.
|
3539
3542
|
var PENDING = 'pending';
|
3540
3543
|
var BLOCKED = 'blocked';
|
3541
3544
|
var RESOLVED_MODEL = 'resolved_model';
|
@@ -3613,7 +3616,7 @@ function wakeChunk(listeners, value) {
|
|
3613
3616
|
|
3614
3617
|
function triggerErrorOnChunk(chunk, error) {
|
3615
3618
|
if (chunk.status !== PENDING && chunk.status !== BLOCKED) {
|
3616
|
-
|
3619
|
+
|
3617
3620
|
return;
|
3618
3621
|
}
|
3619
3622
|
|
@@ -3751,7 +3754,13 @@ function createModelResolver(chunk, parentObject, key) {
|
|
3751
3754
|
}
|
3752
3755
|
|
3753
3756
|
return function (value) {
|
3754
|
-
parentObject[key] = value;
|
3757
|
+
parentObject[key] = value; // If this is the root object for a model reference, where `blocked.value`
|
3758
|
+
// is a stale `null`, the resolved value can be used directly.
|
3759
|
+
|
3760
|
+
if (key === '' && blocked.value === null) {
|
3761
|
+
blocked.value = parentObject[key];
|
3762
|
+
}
|
3763
|
+
|
3755
3764
|
blocked.deps--;
|
3756
3765
|
|
3757
3766
|
if (blocked.deps === 0) {
|
@@ -3806,9 +3815,9 @@ function parseModelString(response, obj, key, value) {
|
|
3806
3815
|
// Promise
|
3807
3816
|
var _id = parseInt(value.slice(2), 16);
|
3808
3817
|
|
3809
|
-
var
|
3818
|
+
var _chunk2 = getChunk(response, _id);
|
3810
3819
|
|
3811
|
-
return
|
3820
|
+
return _chunk2;
|
3812
3821
|
}
|
3813
3822
|
|
3814
3823
|
case 'F':
|
@@ -1662,6 +1662,7 @@ function createModelResolver(chunk, parentObject, key) {
|
|
1662
1662
|
} else blocked = initializingChunkBlockedModel = { deps: 1, value: null };
|
1663
1663
|
return function (value) {
|
1664
1664
|
parentObject[key] = value;
|
1665
|
+
"" === key && null === blocked.value && (blocked.value = parentObject[key]);
|
1665
1666
|
blocked.deps--;
|
1666
1667
|
0 === blocked.deps &&
|
1667
1668
|
"blocked" === chunk.status &&
|
@@ -764,7 +764,9 @@ function createHints() {
|
|
764
764
|
}
|
765
765
|
|
766
766
|
var supportsRequestStorage = typeof AsyncLocalStorage === 'function';
|
767
|
-
var requestStorage = supportsRequestStorage ? new AsyncLocalStorage() : null;
|
767
|
+
var requestStorage = supportsRequestStorage ? new AsyncLocalStorage() : null;
|
768
|
+
var supportsComponentStorage = supportsRequestStorage;
|
769
|
+
var componentStorage = supportsComponentStorage ? new AsyncLocalStorage() : null; // We use the Node version but get access to async_hooks from a global.
|
768
770
|
|
769
771
|
typeof async_hooks === 'object' ? async_hooks.createHook : function () {
|
770
772
|
return {
|
@@ -1119,6 +1121,21 @@ function use(usable) {
|
|
1119
1121
|
}
|
1120
1122
|
}
|
1121
1123
|
|
1124
|
+
var currentOwner = null;
|
1125
|
+
function setCurrentOwner(componentInfo) {
|
1126
|
+
currentOwner = componentInfo;
|
1127
|
+
}
|
1128
|
+
function resolveOwner() {
|
1129
|
+
if (currentOwner) return currentOwner;
|
1130
|
+
|
1131
|
+
if (supportsComponentStorage) {
|
1132
|
+
var owner = componentStorage.getStore();
|
1133
|
+
if (owner) return owner;
|
1134
|
+
}
|
1135
|
+
|
1136
|
+
return null;
|
1137
|
+
}
|
1138
|
+
|
1122
1139
|
function resolveCache() {
|
1123
1140
|
var request = resolveRequest();
|
1124
1141
|
|
@@ -1143,16 +1160,9 @@ var DefaultAsyncDispatcher = {
|
|
1143
1160
|
return entry;
|
1144
1161
|
}
|
1145
1162
|
};
|
1146
|
-
var currentOwner = null;
|
1147
1163
|
|
1148
1164
|
{
|
1149
|
-
DefaultAsyncDispatcher.getOwner =
|
1150
|
-
return currentOwner;
|
1151
|
-
};
|
1152
|
-
}
|
1153
|
-
|
1154
|
-
function setCurrentOwner(componentInfo) {
|
1155
|
-
currentOwner = componentInfo;
|
1165
|
+
DefaultAsyncDispatcher.getOwner = resolveOwner;
|
1156
1166
|
}
|
1157
1167
|
|
1158
1168
|
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
|
@@ -1735,8 +1745,11 @@ function renderFunctionComponent(request, task, key, Component, props, owner) {
|
|
1735
1745
|
// component suspends we can reuse the same task object. If the same
|
1736
1746
|
// component suspends again, the thenable state will be restored.
|
1737
1747
|
var prevThenableState = task.thenableState;
|
1738
|
-
task.thenableState = null;
|
1739
|
-
|
1748
|
+
task.thenableState = null; // The secondArg is always undefined in Server Components since refs error early.
|
1749
|
+
|
1750
|
+
var secondArg = undefined;
|
1751
|
+
var result;
|
1752
|
+
var componentDebugInfo;
|
1740
1753
|
|
1741
1754
|
{
|
1742
1755
|
if (debugID === null) {
|
@@ -1764,18 +1777,17 @@ function renderFunctionComponent(request, task, key, Component, props, owner) {
|
|
1764
1777
|
outlineModel(request, componentDebugInfo);
|
1765
1778
|
emitDebugChunk(request, componentDebugID, componentDebugInfo);
|
1766
1779
|
}
|
1767
|
-
}
|
1768
|
-
|
1769
|
-
prepareToUseHooksForComponent(prevThenableState, componentDebugInfo); // The secondArg is always undefined in Server Components since refs error early.
|
1770
|
-
|
1771
|
-
var secondArg = undefined;
|
1772
|
-
var result;
|
1773
1780
|
|
1774
|
-
|
1781
|
+
prepareToUseHooksForComponent(prevThenableState, componentDebugInfo);
|
1775
1782
|
setCurrentOwner(componentDebugInfo);
|
1776
1783
|
|
1777
1784
|
try {
|
1778
|
-
|
1785
|
+
if (supportsComponentStorage) {
|
1786
|
+
// Run the component in an Async Context that tracks the current owner.
|
1787
|
+
result = componentStorage.run(componentDebugInfo, Component, props, secondArg);
|
1788
|
+
} else {
|
1789
|
+
result = Component(props, secondArg);
|
1790
|
+
}
|
1779
1791
|
} finally {
|
1780
1792
|
setCurrentOwner(null);
|
1781
1793
|
}
|
@@ -3539,7 +3551,6 @@ function loadChunk(chunkId, filename) {
|
|
3539
3551
|
return __webpack_chunk_load__(chunkId);
|
3540
3552
|
}
|
3541
3553
|
|
3542
|
-
// The server acts as a Client of itself when resolving Server References.
|
3543
3554
|
var PENDING = 'pending';
|
3544
3555
|
var BLOCKED = 'blocked';
|
3545
3556
|
var RESOLVED_MODEL = 'resolved_model';
|
@@ -3617,7 +3628,7 @@ function wakeChunk(listeners, value) {
|
|
3617
3628
|
|
3618
3629
|
function triggerErrorOnChunk(chunk, error) {
|
3619
3630
|
if (chunk.status !== PENDING && chunk.status !== BLOCKED) {
|
3620
|
-
|
3631
|
+
|
3621
3632
|
return;
|
3622
3633
|
}
|
3623
3634
|
|
@@ -3755,7 +3766,13 @@ function createModelResolver(chunk, parentObject, key) {
|
|
3755
3766
|
}
|
3756
3767
|
|
3757
3768
|
return function (value) {
|
3758
|
-
parentObject[key] = value;
|
3769
|
+
parentObject[key] = value; // If this is the root object for a model reference, where `blocked.value`
|
3770
|
+
// is a stale `null`, the resolved value can be used directly.
|
3771
|
+
|
3772
|
+
if (key === '' && blocked.value === null) {
|
3773
|
+
blocked.value = parentObject[key];
|
3774
|
+
}
|
3775
|
+
|
3759
3776
|
blocked.deps--;
|
3760
3777
|
|
3761
3778
|
if (blocked.deps === 0) {
|
@@ -3810,9 +3827,9 @@ function parseModelString(response, obj, key, value) {
|
|
3810
3827
|
// Promise
|
3811
3828
|
var _id = parseInt(value.slice(2), 16);
|
3812
3829
|
|
3813
|
-
var
|
3830
|
+
var _chunk2 = getChunk(response, _id);
|
3814
3831
|
|
3815
|
-
return
|
3832
|
+
return _chunk2;
|
3816
3833
|
}
|
3817
3834
|
|
3818
3835
|
case 'F':
|
@@ -1684,6 +1684,7 @@ function createModelResolver(chunk, parentObject, key) {
|
|
1684
1684
|
} else blocked = initializingChunkBlockedModel = { deps: 1, value: null };
|
1685
1685
|
return function (value) {
|
1686
1686
|
parentObject[key] = value;
|
1687
|
+
"" === key && null === blocked.value && (blocked.value = parentObject[key]);
|
1687
1688
|
blocked.deps--;
|
1688
1689
|
0 === blocked.deps &&
|
1689
1690
|
"blocked" === chunk.status &&
|
@@ -832,6 +832,8 @@ function createHints() {
|
|
832
832
|
|
833
833
|
var supportsRequestStorage = true;
|
834
834
|
var requestStorage = new async_hooks.AsyncLocalStorage();
|
835
|
+
var supportsComponentStorage = true;
|
836
|
+
var componentStorage = new async_hooks.AsyncLocalStorage() ;
|
835
837
|
|
836
838
|
var TEMPORARY_REFERENCE_TAG = Symbol.for('react.temporary.reference'); // eslint-disable-next-line no-unused-vars
|
837
839
|
|
@@ -1178,6 +1180,21 @@ function use(usable) {
|
|
1178
1180
|
}
|
1179
1181
|
}
|
1180
1182
|
|
1183
|
+
var currentOwner = null;
|
1184
|
+
function setCurrentOwner(componentInfo) {
|
1185
|
+
currentOwner = componentInfo;
|
1186
|
+
}
|
1187
|
+
function resolveOwner() {
|
1188
|
+
if (currentOwner) return currentOwner;
|
1189
|
+
|
1190
|
+
{
|
1191
|
+
var owner = componentStorage.getStore();
|
1192
|
+
if (owner) return owner;
|
1193
|
+
}
|
1194
|
+
|
1195
|
+
return null;
|
1196
|
+
}
|
1197
|
+
|
1181
1198
|
function resolveCache() {
|
1182
1199
|
var request = resolveRequest();
|
1183
1200
|
|
@@ -1202,16 +1219,9 @@ var DefaultAsyncDispatcher = {
|
|
1202
1219
|
return entry;
|
1203
1220
|
}
|
1204
1221
|
};
|
1205
|
-
var currentOwner = null;
|
1206
1222
|
|
1207
1223
|
{
|
1208
|
-
DefaultAsyncDispatcher.getOwner =
|
1209
|
-
return currentOwner;
|
1210
|
-
};
|
1211
|
-
}
|
1212
|
-
|
1213
|
-
function setCurrentOwner(componentInfo) {
|
1214
|
-
currentOwner = componentInfo;
|
1224
|
+
DefaultAsyncDispatcher.getOwner = resolveOwner;
|
1215
1225
|
}
|
1216
1226
|
|
1217
1227
|
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
|
@@ -1794,8 +1804,11 @@ function renderFunctionComponent(request, task, key, Component, props, owner) {
|
|
1794
1804
|
// component suspends we can reuse the same task object. If the same
|
1795
1805
|
// component suspends again, the thenable state will be restored.
|
1796
1806
|
var prevThenableState = task.thenableState;
|
1797
|
-
task.thenableState = null;
|
1798
|
-
|
1807
|
+
task.thenableState = null; // The secondArg is always undefined in Server Components since refs error early.
|
1808
|
+
|
1809
|
+
var secondArg = undefined;
|
1810
|
+
var result;
|
1811
|
+
var componentDebugInfo;
|
1799
1812
|
|
1800
1813
|
{
|
1801
1814
|
if (debugID === null) {
|
@@ -1823,18 +1836,15 @@ function renderFunctionComponent(request, task, key, Component, props, owner) {
|
|
1823
1836
|
outlineModel(request, componentDebugInfo);
|
1824
1837
|
emitDebugChunk(request, componentDebugID, componentDebugInfo);
|
1825
1838
|
}
|
1826
|
-
}
|
1827
|
-
|
1828
|
-
prepareToUseHooksForComponent(prevThenableState, componentDebugInfo); // The secondArg is always undefined in Server Components since refs error early.
|
1829
|
-
|
1830
|
-
var secondArg = undefined;
|
1831
|
-
var result;
|
1832
1839
|
|
1833
|
-
|
1840
|
+
prepareToUseHooksForComponent(prevThenableState, componentDebugInfo);
|
1834
1841
|
setCurrentOwner(componentDebugInfo);
|
1835
1842
|
|
1836
1843
|
try {
|
1837
|
-
|
1844
|
+
if (supportsComponentStorage) {
|
1845
|
+
// Run the component in an Async Context that tracks the current owner.
|
1846
|
+
result = componentStorage.run(componentDebugInfo, Component, props, secondArg);
|
1847
|
+
}
|
1838
1848
|
} finally {
|
1839
1849
|
setCurrentOwner(null);
|
1840
1850
|
}
|
@@ -3592,7 +3602,6 @@ function loadChunk(chunkId, filename) {
|
|
3592
3602
|
return __webpack_chunk_load__(chunkId);
|
3593
3603
|
}
|
3594
3604
|
|
3595
|
-
// The server acts as a Client of itself when resolving Server References.
|
3596
3605
|
var PENDING = 'pending';
|
3597
3606
|
var BLOCKED = 'blocked';
|
3598
3607
|
var RESOLVED_MODEL = 'resolved_model';
|
@@ -3691,7 +3700,7 @@ function wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners) {
|
|
3691
3700
|
|
3692
3701
|
function triggerErrorOnChunk(chunk, error) {
|
3693
3702
|
if (chunk.status !== PENDING && chunk.status !== BLOCKED) {
|
3694
|
-
|
3703
|
+
|
3695
3704
|
return;
|
3696
3705
|
}
|
3697
3706
|
|
@@ -3712,7 +3721,7 @@ function createResolvedModelChunk(response, value) {
|
|
3712
3721
|
|
3713
3722
|
function resolveModelChunk(chunk, value) {
|
3714
3723
|
if (chunk.status !== PENDING) {
|
3715
|
-
|
3724
|
+
|
3716
3725
|
return;
|
3717
3726
|
}
|
3718
3727
|
|
@@ -3851,7 +3860,13 @@ function createModelResolver(chunk, parentObject, key) {
|
|
3851
3860
|
}
|
3852
3861
|
|
3853
3862
|
return function (value) {
|
3854
|
-
parentObject[key] = value;
|
3863
|
+
parentObject[key] = value; // If this is the root object for a model reference, where `blocked.value`
|
3864
|
+
// is a stale `null`, the resolved value can be used directly.
|
3865
|
+
|
3866
|
+
if (key === '' && blocked.value === null) {
|
3867
|
+
blocked.value = parentObject[key];
|
3868
|
+
}
|
3869
|
+
|
3855
3870
|
blocked.deps--;
|
3856
3871
|
|
3857
3872
|
if (blocked.deps === 0) {
|
@@ -3906,9 +3921,9 @@ function parseModelString(response, obj, key, value) {
|
|
3906
3921
|
// Promise
|
3907
3922
|
var _id = parseInt(value.slice(2), 16);
|
3908
3923
|
|
3909
|
-
var
|
3924
|
+
var _chunk2 = getChunk(response, _id);
|
3910
3925
|
|
3911
|
-
return
|
3926
|
+
return _chunk2;
|
3912
3927
|
}
|
3913
3928
|
|
3914
3929
|
case 'F':
|
@@ -1738,6 +1738,7 @@ function createModelResolver(chunk, parentObject, key) {
|
|
1738
1738
|
} else blocked = initializingChunkBlockedModel = { deps: 1, value: null };
|
1739
1739
|
return function (value) {
|
1740
1740
|
parentObject[key] = value;
|
1741
|
+
"" === key && null === blocked.value && (blocked.value = parentObject[key]);
|
1741
1742
|
blocked.deps--;
|
1742
1743
|
0 === blocked.deps &&
|
1743
1744
|
"blocked" === chunk.status &&
|
@@ -832,6 +832,8 @@ function createHints() {
|
|
832
832
|
|
833
833
|
var supportsRequestStorage = true;
|
834
834
|
var requestStorage = new async_hooks.AsyncLocalStorage();
|
835
|
+
var supportsComponentStorage = true;
|
836
|
+
var componentStorage = new async_hooks.AsyncLocalStorage() ;
|
835
837
|
|
836
838
|
var TEMPORARY_REFERENCE_TAG = Symbol.for('react.temporary.reference'); // eslint-disable-next-line no-unused-vars
|
837
839
|
|
@@ -1178,6 +1180,21 @@ function use(usable) {
|
|
1178
1180
|
}
|
1179
1181
|
}
|
1180
1182
|
|
1183
|
+
var currentOwner = null;
|
1184
|
+
function setCurrentOwner(componentInfo) {
|
1185
|
+
currentOwner = componentInfo;
|
1186
|
+
}
|
1187
|
+
function resolveOwner() {
|
1188
|
+
if (currentOwner) return currentOwner;
|
1189
|
+
|
1190
|
+
{
|
1191
|
+
var owner = componentStorage.getStore();
|
1192
|
+
if (owner) return owner;
|
1193
|
+
}
|
1194
|
+
|
1195
|
+
return null;
|
1196
|
+
}
|
1197
|
+
|
1181
1198
|
function resolveCache() {
|
1182
1199
|
var request = resolveRequest();
|
1183
1200
|
|
@@ -1202,16 +1219,9 @@ var DefaultAsyncDispatcher = {
|
|
1202
1219
|
return entry;
|
1203
1220
|
}
|
1204
1221
|
};
|
1205
|
-
var currentOwner = null;
|
1206
1222
|
|
1207
1223
|
{
|
1208
|
-
DefaultAsyncDispatcher.getOwner =
|
1209
|
-
return currentOwner;
|
1210
|
-
};
|
1211
|
-
}
|
1212
|
-
|
1213
|
-
function setCurrentOwner(componentInfo) {
|
1214
|
-
currentOwner = componentInfo;
|
1224
|
+
DefaultAsyncDispatcher.getOwner = resolveOwner;
|
1215
1225
|
}
|
1216
1226
|
|
1217
1227
|
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
|
@@ -1794,8 +1804,11 @@ function renderFunctionComponent(request, task, key, Component, props, owner) {
|
|
1794
1804
|
// component suspends we can reuse the same task object. If the same
|
1795
1805
|
// component suspends again, the thenable state will be restored.
|
1796
1806
|
var prevThenableState = task.thenableState;
|
1797
|
-
task.thenableState = null;
|
1798
|
-
|
1807
|
+
task.thenableState = null; // The secondArg is always undefined in Server Components since refs error early.
|
1808
|
+
|
1809
|
+
var secondArg = undefined;
|
1810
|
+
var result;
|
1811
|
+
var componentDebugInfo;
|
1799
1812
|
|
1800
1813
|
{
|
1801
1814
|
if (debugID === null) {
|
@@ -1823,18 +1836,15 @@ function renderFunctionComponent(request, task, key, Component, props, owner) {
|
|
1823
1836
|
outlineModel(request, componentDebugInfo);
|
1824
1837
|
emitDebugChunk(request, componentDebugID, componentDebugInfo);
|
1825
1838
|
}
|
1826
|
-
}
|
1827
|
-
|
1828
|
-
prepareToUseHooksForComponent(prevThenableState, componentDebugInfo); // The secondArg is always undefined in Server Components since refs error early.
|
1829
|
-
|
1830
|
-
var secondArg = undefined;
|
1831
|
-
var result;
|
1832
1839
|
|
1833
|
-
|
1840
|
+
prepareToUseHooksForComponent(prevThenableState, componentDebugInfo);
|
1834
1841
|
setCurrentOwner(componentDebugInfo);
|
1835
1842
|
|
1836
1843
|
try {
|
1837
|
-
|
1844
|
+
if (supportsComponentStorage) {
|
1845
|
+
// Run the component in an Async Context that tracks the current owner.
|
1846
|
+
result = componentStorage.run(componentDebugInfo, Component, props, secondArg);
|
1847
|
+
}
|
1838
1848
|
} finally {
|
1839
1849
|
setCurrentOwner(null);
|
1840
1850
|
}
|
@@ -3519,7 +3529,6 @@ function requireModule(metadata) {
|
|
3519
3529
|
return moduleExports[metadata.name];
|
3520
3530
|
}
|
3521
3531
|
|
3522
|
-
// The server acts as a Client of itself when resolving Server References.
|
3523
3532
|
var PENDING = 'pending';
|
3524
3533
|
var BLOCKED = 'blocked';
|
3525
3534
|
var RESOLVED_MODEL = 'resolved_model';
|
@@ -3618,7 +3627,7 @@ function wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners) {
|
|
3618
3627
|
|
3619
3628
|
function triggerErrorOnChunk(chunk, error) {
|
3620
3629
|
if (chunk.status !== PENDING && chunk.status !== BLOCKED) {
|
3621
|
-
|
3630
|
+
|
3622
3631
|
return;
|
3623
3632
|
}
|
3624
3633
|
|
@@ -3639,7 +3648,7 @@ function createResolvedModelChunk(response, value) {
|
|
3639
3648
|
|
3640
3649
|
function resolveModelChunk(chunk, value) {
|
3641
3650
|
if (chunk.status !== PENDING) {
|
3642
|
-
|
3651
|
+
|
3643
3652
|
return;
|
3644
3653
|
}
|
3645
3654
|
|
@@ -3778,7 +3787,13 @@ function createModelResolver(chunk, parentObject, key) {
|
|
3778
3787
|
}
|
3779
3788
|
|
3780
3789
|
return function (value) {
|
3781
|
-
parentObject[key] = value;
|
3790
|
+
parentObject[key] = value; // If this is the root object for a model reference, where `blocked.value`
|
3791
|
+
// is a stale `null`, the resolved value can be used directly.
|
3792
|
+
|
3793
|
+
if (key === '' && blocked.value === null) {
|
3794
|
+
blocked.value = parentObject[key];
|
3795
|
+
}
|
3796
|
+
|
3782
3797
|
blocked.deps--;
|
3783
3798
|
|
3784
3799
|
if (blocked.deps === 0) {
|
@@ -3833,9 +3848,9 @@ function parseModelString(response, obj, key, value) {
|
|
3833
3848
|
// Promise
|
3834
3849
|
var _id = parseInt(value.slice(2), 16);
|
3835
3850
|
|
3836
|
-
var
|
3851
|
+
var _chunk2 = getChunk(response, _id);
|
3837
3852
|
|
3838
|
-
return
|
3853
|
+
return _chunk2;
|
3839
3854
|
}
|
3840
3855
|
|
3841
3856
|
case 'F':
|
@@ -1706,6 +1706,7 @@ function createModelResolver(chunk, parentObject, key) {
|
|
1706
1706
|
} else blocked = initializingChunkBlockedModel = { deps: 1, value: null };
|
1707
1707
|
return function (value) {
|
1708
1708
|
parentObject[key] = value;
|
1709
|
+
"" === key && null === blocked.value && (blocked.value = parentObject[key]);
|
1709
1710
|
blocked.deps--;
|
1710
1711
|
0 === blocked.deps &&
|
1711
1712
|
"blocked" === chunk.status &&
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-server-dom-webpack",
|
3
3
|
"description": "React Server Components bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.",
|
4
|
-
"version": "19.0.0-beta-
|
4
|
+
"version": "19.0.0-beta-b498834eab-20240506",
|
5
5
|
"keywords": [
|
6
6
|
"react"
|
7
7
|
],
|
@@ -77,8 +77,8 @@
|
|
77
77
|
"node": ">=0.10.0"
|
78
78
|
},
|
79
79
|
"peerDependencies": {
|
80
|
-
"react": "19.0.0-beta-
|
81
|
-
"react-dom": "19.0.0-beta-
|
80
|
+
"react": "19.0.0-beta-b498834eab-20240506",
|
81
|
+
"react-dom": "19.0.0-beta-b498834eab-20240506",
|
82
82
|
"webpack": "^5.59.0"
|
83
83
|
},
|
84
84
|
"dependencies": {
|