react-server-dom-webpack
Advanced tools
Comparing version 19.0.0 to 19.1.0-canary-029e8bd6-20250306
@@ -422,3 +422,3 @@ /** | ||
throw Error( | ||
"Only plain objects, and a few built-ins, can be passed to Server Actions. Classes or null prototypes are not supported." | ||
"Only plain objects, and a few built-ins, can be passed to Server Functions. Classes or null prototypes are not supported." | ||
); | ||
@@ -507,4 +507,4 @@ return "$T"; | ||
} | ||
function registerServerReference(proxy, reference) { | ||
knownServerReferences.set(proxy, reference); | ||
function registerBoundServerReference(reference, id, bound) { | ||
knownServerReferences.set(reference, { id: id, bound: bound }); | ||
} | ||
@@ -524,3 +524,3 @@ function createBoundServerReference(metaData, callServer) { | ||
bound = metaData.bound; | ||
registerServerReference(action, { id: id, bound: bound }); | ||
registerBoundServerReference(action, id, bound); | ||
return action; | ||
@@ -695,2 +695,4 @@ } | ||
function reportGlobalError(response, error) { | ||
response._closed = !0; | ||
response._closedReason = error; | ||
response._chunks.forEach(function (chunk) { | ||
@@ -706,3 +708,7 @@ "pending" === chunk.status && triggerErrorOnChunk(chunk, error); | ||
chunk = chunks.get(id); | ||
chunk || ((chunk = createPendingChunk(response)), chunks.set(id, chunk)); | ||
chunk || | ||
((chunk = response._closed | ||
? new ReactPromise("rejected", null, response._closedReason, response) | ||
: createPendingChunk(response)), | ||
chunks.set(id, chunk)); | ||
return chunk; | ||
@@ -788,3 +794,8 @@ } | ||
else if (metaData.bound) response = Promise.resolve(metaData.bound); | ||
else return requireModule(serverReference); | ||
else | ||
return ( | ||
(response = requireModule(serverReference)), | ||
registerBoundServerReference(response, metaData.id, metaData.bound), | ||
response | ||
); | ||
if (initializingHandler) { | ||
@@ -809,2 +820,3 @@ var handler = initializingHandler; | ||
} | ||
registerBoundServerReference(resolvedValue, metaData.id, metaData.bound); | ||
parentObject[key] = resolvedValue; | ||
@@ -1038,2 +1050,4 @@ "" === key && null === handler.value && (handler.value = resolvedValue); | ||
this._buffer = []; | ||
this._closed = !1; | ||
this._closedReason = null; | ||
this._tempRefs = temporaryReferences; | ||
@@ -1418,2 +1432,3 @@ this._fromJSON = createFromJSONCallback(this); | ||
break; | ||
case 78: | ||
case 68: | ||
@@ -1617,3 +1632,3 @@ case 87: | ||
} | ||
registerServerReference(action, { id: id, bound: null }); | ||
registerBoundServerReference(action, id, null); | ||
return action; | ||
@@ -1648,1 +1663,5 @@ }; | ||
}; | ||
exports.registerServerReference = function (reference, id) { | ||
registerBoundServerReference(reference, id, null); | ||
return reference; | ||
}; |
@@ -434,3 +434,3 @@ /** | ||
throw Error( | ||
"Only plain objects, and a few built-ins, can be passed to Server Actions. Classes or null prototypes are not supported." | ||
"Only plain objects, and a few built-ins, can be passed to Server Functions. Classes or null prototypes are not supported." | ||
); | ||
@@ -611,4 +611,9 @@ return "$T"; | ||
} | ||
function registerServerReference(proxy, reference$jscomp$0, encodeFormAction) { | ||
Object.defineProperties(proxy, { | ||
function registerBoundServerReference( | ||
reference$jscomp$0, | ||
id, | ||
bound, | ||
encodeFormAction | ||
) { | ||
Object.defineProperties(reference$jscomp$0, { | ||
$$FORM_ACTION: { | ||
@@ -632,3 +637,3 @@ value: | ||
}); | ||
knownServerReferences.set(proxy, reference$jscomp$0); | ||
knownServerReferences.set(reference$jscomp$0, { id: id, bound: bound }); | ||
} | ||
@@ -671,3 +676,3 @@ var FunctionBind = Function.prototype.bind, | ||
bound = metaData.bound; | ||
registerServerReference(action, { id: id, bound: bound }, encodeFormAction); | ||
registerBoundServerReference(action, id, bound, encodeFormAction); | ||
return action; | ||
@@ -680,3 +685,3 @@ } | ||
} | ||
registerServerReference(action, { id: id, bound: null }, encodeFormAction); | ||
registerBoundServerReference(action, id, null, encodeFormAction); | ||
return action; | ||
@@ -851,2 +856,4 @@ } | ||
function reportGlobalError(response, error) { | ||
response._closed = !0; | ||
response._closedReason = error; | ||
response._chunks.forEach(function (chunk) { | ||
@@ -862,3 +869,7 @@ "pending" === chunk.status && triggerErrorOnChunk(chunk, error); | ||
chunk = chunks.get(id); | ||
chunk || ((chunk = createPendingChunk(response)), chunks.set(id, chunk)); | ||
chunk || | ||
((chunk = response._closed | ||
? new ReactPromise("rejected", null, response._closedReason, response) | ||
: createPendingChunk(response)), | ||
chunks.set(id, chunk)); | ||
return chunk; | ||
@@ -942,9 +953,20 @@ } | ||
var serverReference = resolveServerReference( | ||
response._serverReferenceConfig, | ||
metaData.id | ||
); | ||
if ((response = preloadModule(serverReference))) | ||
metaData.bound && (response = Promise.all([response, metaData.bound])); | ||
else if (metaData.bound) response = Promise.resolve(metaData.bound); | ||
else return requireModule(serverReference); | ||
response._serverReferenceConfig, | ||
metaData.id | ||
), | ||
promise = preloadModule(serverReference); | ||
if (promise) | ||
metaData.bound && (promise = Promise.all([promise, metaData.bound])); | ||
else if (metaData.bound) promise = Promise.resolve(metaData.bound); | ||
else | ||
return ( | ||
(promise = requireModule(serverReference)), | ||
registerBoundServerReference( | ||
promise, | ||
metaData.id, | ||
metaData.bound, | ||
response._encodeFormAction | ||
), | ||
promise | ||
); | ||
if (initializingHandler) { | ||
@@ -961,3 +983,3 @@ var handler = initializingHandler; | ||
}; | ||
response.then( | ||
promise.then( | ||
function () { | ||
@@ -970,2 +992,8 @@ var resolvedValue = requireModule(serverReference); | ||
} | ||
registerBoundServerReference( | ||
resolvedValue, | ||
metaData.id, | ||
metaData.bound, | ||
response._encodeFormAction | ||
); | ||
parentObject[key] = resolvedValue; | ||
@@ -1199,2 +1227,4 @@ "" === key && null === handler.value && (handler.value = resolvedValue); | ||
this._buffer = []; | ||
this._closed = !1; | ||
this._closedReason = null; | ||
this._tempRefs = temporaryReferences; | ||
@@ -1584,2 +1614,3 @@ this._fromJSON = createFromJSONCallback(this); | ||
break; | ||
case 78: | ||
case 68: | ||
@@ -1813,1 +1844,5 @@ case 87: | ||
}; | ||
exports.registerServerReference = function (reference, id, encodeFormAction) { | ||
registerBoundServerReference(reference, id, null, encodeFormAction); | ||
return reference; | ||
}; |
@@ -435,3 +435,3 @@ /** | ||
throw Error( | ||
"Only plain objects, and a few built-ins, can be passed to Server Actions. Classes or null prototypes are not supported." | ||
"Only plain objects, and a few built-ins, can be passed to Server Functions. Classes or null prototypes are not supported." | ||
); | ||
@@ -612,4 +612,9 @@ return "$T"; | ||
} | ||
function registerServerReference(proxy, reference$jscomp$0, encodeFormAction) { | ||
Object.defineProperties(proxy, { | ||
function registerBoundServerReference( | ||
reference$jscomp$0, | ||
id, | ||
bound, | ||
encodeFormAction | ||
) { | ||
Object.defineProperties(reference$jscomp$0, { | ||
$$FORM_ACTION: { | ||
@@ -633,3 +638,3 @@ value: | ||
}); | ||
knownServerReferences.set(proxy, reference$jscomp$0); | ||
knownServerReferences.set(reference$jscomp$0, { id: id, bound: bound }); | ||
} | ||
@@ -672,3 +677,3 @@ var FunctionBind = Function.prototype.bind, | ||
bound = metaData.bound; | ||
registerServerReference(action, { id: id, bound: bound }, encodeFormAction); | ||
registerBoundServerReference(action, id, bound, encodeFormAction); | ||
return action; | ||
@@ -681,3 +686,3 @@ } | ||
} | ||
registerServerReference(action, { id: id, bound: null }, encodeFormAction); | ||
registerBoundServerReference(action, id, null, encodeFormAction); | ||
return action; | ||
@@ -852,2 +857,4 @@ } | ||
function reportGlobalError(response, error) { | ||
response._closed = !0; | ||
response._closedReason = error; | ||
response._chunks.forEach(function (chunk) { | ||
@@ -863,3 +870,7 @@ "pending" === chunk.status && triggerErrorOnChunk(chunk, error); | ||
chunk = chunks.get(id); | ||
chunk || ((chunk = createPendingChunk(response)), chunks.set(id, chunk)); | ||
chunk || | ||
((chunk = response._closed | ||
? new ReactPromise("rejected", null, response._closedReason, response) | ||
: createPendingChunk(response)), | ||
chunks.set(id, chunk)); | ||
return chunk; | ||
@@ -943,9 +954,20 @@ } | ||
var serverReference = resolveServerReference( | ||
response._serverReferenceConfig, | ||
metaData.id | ||
); | ||
if ((response = preloadModule(serverReference))) | ||
metaData.bound && (response = Promise.all([response, metaData.bound])); | ||
else if (metaData.bound) response = Promise.resolve(metaData.bound); | ||
else return requireModule(serverReference); | ||
response._serverReferenceConfig, | ||
metaData.id | ||
), | ||
promise = preloadModule(serverReference); | ||
if (promise) | ||
metaData.bound && (promise = Promise.all([promise, metaData.bound])); | ||
else if (metaData.bound) promise = Promise.resolve(metaData.bound); | ||
else | ||
return ( | ||
(promise = requireModule(serverReference)), | ||
registerBoundServerReference( | ||
promise, | ||
metaData.id, | ||
metaData.bound, | ||
response._encodeFormAction | ||
), | ||
promise | ||
); | ||
if (initializingHandler) { | ||
@@ -962,3 +984,3 @@ var handler = initializingHandler; | ||
}; | ||
response.then( | ||
promise.then( | ||
function () { | ||
@@ -971,2 +993,8 @@ var resolvedValue = requireModule(serverReference); | ||
} | ||
registerBoundServerReference( | ||
resolvedValue, | ||
metaData.id, | ||
metaData.bound, | ||
response._encodeFormAction | ||
); | ||
parentObject[key] = resolvedValue; | ||
@@ -1200,2 +1228,4 @@ "" === key && null === handler.value && (handler.value = resolvedValue); | ||
this._buffer = []; | ||
this._closed = !1; | ||
this._closedReason = null; | ||
this._tempRefs = temporaryReferences; | ||
@@ -1587,2 +1617,3 @@ this._fromJSON = createFromJSONCallback(this); | ||
break; | ||
case 78: | ||
case 68: | ||
@@ -1862,1 +1893,5 @@ case 87: | ||
}; | ||
exports.registerServerReference = function (reference, id, encodeFormAction) { | ||
registerBoundServerReference(reference, id, null, encodeFormAction); | ||
return reference; | ||
}; |
@@ -400,3 +400,3 @@ /** | ||
throw Error( | ||
"Only plain objects, and a few built-ins, can be passed to Server Actions. Classes or null prototypes are not supported." | ||
"Only plain objects, and a few built-ins, can be passed to Server Functions. Classes or null prototypes are not supported." | ||
); | ||
@@ -577,4 +577,9 @@ return "$T"; | ||
} | ||
function registerServerReference(proxy, reference$jscomp$0, encodeFormAction) { | ||
Object.defineProperties(proxy, { | ||
function registerBoundServerReference( | ||
reference$jscomp$0, | ||
id, | ||
bound, | ||
encodeFormAction | ||
) { | ||
Object.defineProperties(reference$jscomp$0, { | ||
$$FORM_ACTION: { | ||
@@ -598,3 +603,3 @@ value: | ||
}); | ||
knownServerReferences.set(proxy, reference$jscomp$0); | ||
knownServerReferences.set(reference$jscomp$0, { id: id, bound: bound }); | ||
} | ||
@@ -637,3 +642,3 @@ var FunctionBind = Function.prototype.bind, | ||
bound = metaData.bound; | ||
registerServerReference(action, { id: id, bound: bound }, encodeFormAction); | ||
registerBoundServerReference(action, id, bound, encodeFormAction); | ||
return action; | ||
@@ -646,3 +651,3 @@ } | ||
} | ||
registerServerReference(action, { id: id, bound: null }, encodeFormAction); | ||
registerBoundServerReference(action, id, null, encodeFormAction); | ||
return action; | ||
@@ -817,2 +822,4 @@ } | ||
function reportGlobalError(response, error) { | ||
response._closed = !0; | ||
response._closedReason = error; | ||
response._chunks.forEach(function (chunk) { | ||
@@ -828,3 +835,7 @@ "pending" === chunk.status && triggerErrorOnChunk(chunk, error); | ||
chunk = chunks.get(id); | ||
chunk || ((chunk = createPendingChunk(response)), chunks.set(id, chunk)); | ||
chunk || | ||
((chunk = response._closed | ||
? new ReactPromise("rejected", null, response._closedReason, response) | ||
: createPendingChunk(response)), | ||
chunks.set(id, chunk)); | ||
return chunk; | ||
@@ -908,9 +919,20 @@ } | ||
var serverReference = resolveServerReference( | ||
response._serverReferenceConfig, | ||
metaData.id | ||
); | ||
if ((response = preloadModule(serverReference))) | ||
metaData.bound && (response = Promise.all([response, metaData.bound])); | ||
else if (metaData.bound) response = Promise.resolve(metaData.bound); | ||
else return requireModule(serverReference); | ||
response._serverReferenceConfig, | ||
metaData.id | ||
), | ||
promise = preloadModule(serverReference); | ||
if (promise) | ||
metaData.bound && (promise = Promise.all([promise, metaData.bound])); | ||
else if (metaData.bound) promise = Promise.resolve(metaData.bound); | ||
else | ||
return ( | ||
(promise = requireModule(serverReference)), | ||
registerBoundServerReference( | ||
promise, | ||
metaData.id, | ||
metaData.bound, | ||
response._encodeFormAction | ||
), | ||
promise | ||
); | ||
if (initializingHandler) { | ||
@@ -927,3 +949,3 @@ var handler = initializingHandler; | ||
}; | ||
response.then( | ||
promise.then( | ||
function () { | ||
@@ -936,2 +958,8 @@ var resolvedValue = requireModule(serverReference); | ||
} | ||
registerBoundServerReference( | ||
resolvedValue, | ||
metaData.id, | ||
metaData.bound, | ||
response._encodeFormAction | ||
); | ||
parentObject[key] = resolvedValue; | ||
@@ -1165,2 +1193,4 @@ "" === key && null === handler.value && (handler.value = resolvedValue); | ||
this._buffer = []; | ||
this._closed = !1; | ||
this._closedReason = null; | ||
this._tempRefs = temporaryReferences; | ||
@@ -1552,2 +1582,3 @@ this._fromJSON = createFromJSONCallback(this); | ||
break; | ||
case 78: | ||
case 68: | ||
@@ -1827,1 +1858,5 @@ case 87: | ||
}; | ||
exports.registerServerReference = function (reference, id, encodeFormAction) { | ||
registerBoundServerReference(reference, id, null, encodeFormAction); | ||
return reference; | ||
}; |
{ | ||
"name": "react-server-dom-webpack", | ||
"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.", | ||
"version": "19.0.0", | ||
"version": "19.1.0-canary-029e8bd6-20250306", | ||
"keywords": [ | ||
@@ -102,4 +102,4 @@ "react" | ||
"peerDependencies": { | ||
"react": "^19.0.0", | ||
"react-dom": "^19.0.0", | ||
"react": "19.1.0-canary-029e8bd6-20250306", | ||
"react-dom": "19.1.0-canary-029e8bd6-20250306", | ||
"webpack": "^5.59.0" | ||
@@ -106,0 +106,0 @@ }, |
@@ -12,2 +12,3 @@ 'use strict'; | ||
exports.decodeReply = s.decodeReply; | ||
exports.decodeReplyFromAsyncIterable = s.decodeReplyFromAsyncIterable; | ||
exports.decodeAction = s.decodeAction; | ||
@@ -14,0 +15,0 @@ exports.decodeFormState = s.decodeFormState; |
@@ -10,4 +10,4 @@ 'use strict'; | ||
if (s.prerender) { | ||
exports.prerender = s.prerender; | ||
if (s.unstable_prerender) { | ||
exports.unstable_prerender = s.unstable_prerender; | ||
} |
@@ -10,4 +10,4 @@ 'use strict'; | ||
if (s.prerender) { | ||
exports.prerender = s.prerender; | ||
if (s.unstable_prerender) { | ||
exports.unstable_prerender = s.unstable_prerender; | ||
} |
@@ -10,4 +10,4 @@ 'use strict'; | ||
if (s.prerenderToNodeStream) { | ||
exports.prerenderToNodeStream = s.prerenderToNodeStream; | ||
if (s.unstable_prerenderToNodeStream) { | ||
exports.unstable_prerenderToNodeStream = s.unstable_prerenderToNodeStream; | ||
} |
@@ -10,4 +10,4 @@ 'use strict'; | ||
if (s.prerenderToNodeStream) { | ||
exports.prerenderToNodeStream = s.prerenderToNodeStream; | ||
if (s.unstable_prerenderToNodeStream) { | ||
exports.unstable_prerenderToNodeStream = s.unstable_prerenderToNodeStream; | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1669873
47636
1