react-server-dom-webpack 19.2.0-canary-b9cfa0d3-20250505 → 19.2.0-canary-0ff1d13b-20250507

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.
@@ -2693,10 +2693,10 @@
2693
2693
  return hook.checkDCE ? !0 : !1;
2694
2694
  })({
2695
2695
  bundleType: 1,
2696
- version: "19.2.0-canary-b9cfa0d3-20250505",
2696
+ version: "19.2.0-canary-0ff1d13b-20250507",
2697
2697
  rendererPackageName: "react-server-dom-webpack",
2698
2698
  currentDispatcherRef: ReactSharedInternals,
2699
- reconcilerVersion: "19.2.0-canary-b9cfa0d3-20250505",
2699
+ reconcilerVersion: "19.2.0-canary-0ff1d13b-20250507",
2700
2700
  getCurrentComponentInfo: function () {
2701
2701
  return currentOwnerInDEV;
2702
2702
  }
@@ -197,18 +197,75 @@
197
197
  ((hasProperties = !0), (trimmed[key] = options[key]));
198
198
  return hasProperties ? trimmed : null;
199
199
  }
200
- function parseStackTrace(error, skipFrames) {
201
- a: {
202
- var previousPrepare = Error.prepareStackTrace;
203
- Error.prepareStackTrace = void 0;
204
- try {
205
- var stack = String(error.stack);
206
- break a;
207
- } finally {
208
- Error.prepareStackTrace = previousPrepare;
200
+ function collectStackTrace(error, structuredStackTrace) {
201
+ for (
202
+ var result = [], i = framesToSkip;
203
+ i < structuredStackTrace.length;
204
+ i++
205
+ ) {
206
+ var callSite = structuredStackTrace[i],
207
+ _name = callSite.getFunctionName() || "<anonymous>";
208
+ if ("react-stack-bottom-frame" === _name) break;
209
+ else if (callSite.isNative()) result.push([_name, "", 0, 0]);
210
+ else {
211
+ if (callSite.isConstructor()) _name = "new " + _name;
212
+ else if (!callSite.isToplevel()) {
213
+ var callSite$jscomp$0 = callSite;
214
+ _name = callSite$jscomp$0.getTypeName();
215
+ var methodName = callSite$jscomp$0.getMethodName();
216
+ callSite$jscomp$0 = callSite$jscomp$0.getFunctionName();
217
+ var result$jscomp$0 = "";
218
+ callSite$jscomp$0
219
+ ? (_name &&
220
+ identifierRegExp.test(callSite$jscomp$0) &&
221
+ callSite$jscomp$0 !== _name &&
222
+ (result$jscomp$0 += _name + "."),
223
+ (result$jscomp$0 += callSite$jscomp$0),
224
+ !methodName ||
225
+ callSite$jscomp$0 === methodName ||
226
+ callSite$jscomp$0.endsWith("." + methodName) ||
227
+ callSite$jscomp$0.endsWith(" " + methodName) ||
228
+ (result$jscomp$0 += " [as " + methodName + "]"))
229
+ : (_name && (result$jscomp$0 += _name + "."),
230
+ (result$jscomp$0 = methodName
231
+ ? result$jscomp$0 + methodName
232
+ : result$jscomp$0 + "<anonymous>"));
233
+ _name = result$jscomp$0;
234
+ }
235
+ "<anonymous>" === _name && (_name = "");
236
+ methodName = callSite.getScriptNameOrSourceURL() || "<anonymous>";
237
+ "<anonymous>" === methodName && (methodName = "");
238
+ callSite.isEval() &&
239
+ !methodName &&
240
+ (callSite$jscomp$0 = callSite.getEvalOrigin()) &&
241
+ (methodName = callSite$jscomp$0.toString() + ", <anonymous>");
242
+ callSite$jscomp$0 = callSite.getLineNumber() || 0;
243
+ callSite = callSite.getColumnNumber() || 0;
244
+ result.push([_name, methodName, callSite$jscomp$0, callSite]);
209
245
  }
210
- stack = void 0;
211
246
  }
247
+ error = (error.name || "Error") + ": " + (error.message || "");
248
+ for (i = 0; i < structuredStackTrace.length; i++)
249
+ error += "\n at " + structuredStackTrace[i].toString();
250
+ collectedStackTrace = result;
251
+ return error;
252
+ }
253
+ function parseStackTrace(error, skipFrames) {
254
+ collectedStackTrace = null;
255
+ framesToSkip = skipFrames;
256
+ var previousPrepare = Error.prepareStackTrace;
257
+ Error.prepareStackTrace = collectStackTrace;
258
+ try {
259
+ var stack = String(error.stack);
260
+ } finally {
261
+ Error.prepareStackTrace = previousPrepare;
262
+ }
263
+ if (null !== collectedStackTrace)
264
+ return (
265
+ (skipFrames = collectedStackTrace),
266
+ (collectedStackTrace = null),
267
+ skipFrames
268
+ );
212
269
  stack.startsWith("Error: react-stack-top-frame\n") &&
213
270
  (stack = stack.slice(29));
214
271
  error = stack.indexOf("react-stack-bottom-frame");
@@ -527,10 +584,17 @@
527
584
  );
528
585
  }
529
586
  function filterStackTrace(request, error, skipFrames) {
587
+ var existing = stackTraceCache.get(error);
588
+ if (void 0 !== existing) {
589
+ error = existing.slice(0);
590
+ for (request = 0; request < error.length; request++)
591
+ error[request] = error[request].slice(0);
592
+ return error;
593
+ }
530
594
  request = request.filterStackFrame;
531
- error = parseStackTrace(error, skipFrames);
532
- for (skipFrames = 0; skipFrames < error.length; skipFrames++) {
533
- var callsite = error[skipFrames],
595
+ skipFrames = parseStackTrace(error, skipFrames);
596
+ for (existing = 0; existing < skipFrames.length; existing++) {
597
+ var callsite = skipFrames[existing],
534
598
  functionName = callsite[0],
535
599
  url = callsite[1];
536
600
  if (url.startsWith("rsc://React/")) {
@@ -541,9 +605,10 @@
541
605
  (url = callsite[1] = url.slice(envIdx + 1, suffixIdx));
542
606
  }
543
607
  request(url, functionName) ||
544
- (error.splice(skipFrames, 1), skipFrames--);
608
+ (skipFrames.splice(existing, 1), existing--);
545
609
  }
546
- return error;
610
+ stackTraceCache.set(error, skipFrames);
611
+ return skipFrames;
547
612
  }
548
613
  function patchConsole(consoleInst, methodName) {
549
614
  var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName);
@@ -3665,7 +3730,10 @@
3665
3730
  }
3666
3731
  }
3667
3732
  };
3668
- var frameRegExp =
3733
+ var framesToSkip = 0,
3734
+ collectedStackTrace = null,
3735
+ identifierRegExp = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/,
3736
+ frameRegExp =
3669
3737
  /^ {3} at (?:(.+) \((?:(.+):(\d+):(\d+)|<anonymous>)\)|(?:async )?(.+):(\d+):(\d+)|<anonymous>)$/,
3670
3738
  TEMPORARY_REFERENCE_TAG = Symbol.for("react.temporary.reference"),
3671
3739
  proxyHandlers = {
@@ -3867,7 +3935,8 @@
3867
3935
  jsxPropsParents = new WeakMap(),
3868
3936
  jsxChildrenParents = new WeakMap(),
3869
3937
  CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"),
3870
- doNotLimit = new WeakSet();
3938
+ doNotLimit = new WeakSet(),
3939
+ stackTraceCache = new WeakMap();
3871
3940
  "object" === typeof console &&
3872
3941
  null !== console &&
3873
3942
  (patchConsole(console, "assert"),
@@ -840,8 +840,8 @@ function serializeReadableStream(request, task, stream) {
840
840
  tryStreamTask(request, streamTask),
841
841
  enqueueFlush(request),
842
842
  reader.read().then(progress, error);
843
- } catch (x$7) {
844
- error(x$7);
843
+ } catch (x$10) {
844
+ error(x$10);
845
845
  }
846
846
  }
847
847
  function error(reason) {
@@ -914,8 +914,8 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
914
914
  tryStreamTask(request, streamTask),
915
915
  enqueueFlush(request),
916
916
  iterator.next().then(progress, error);
917
- } catch (x$8) {
918
- error(x$8);
917
+ } catch (x$11) {
918
+ error(x$11);
919
919
  }
920
920
  }
921
921
  function error(reason) {
@@ -1921,7 +1921,7 @@ function abort(request, reason) {
1921
1921
  }
1922
1922
  var abortListeners = request.abortListeners;
1923
1923
  if (0 < abortListeners.size) {
1924
- var error$22 =
1924
+ var error$25 =
1925
1925
  void 0 === reason
1926
1926
  ? Error("The render was aborted by the server without a reason.")
1927
1927
  : "object" === typeof reason &&
@@ -1930,15 +1930,15 @@ function abort(request, reason) {
1930
1930
  ? Error("The render was aborted by the server with a promise.")
1931
1931
  : reason;
1932
1932
  abortListeners.forEach(function (callback) {
1933
- return callback(error$22);
1933
+ return callback(error$25);
1934
1934
  });
1935
1935
  abortListeners.clear();
1936
1936
  callOnAllReadyIfReady(request);
1937
1937
  }
1938
1938
  null !== request.destination &&
1939
1939
  flushCompletedChunks(request, request.destination);
1940
- } catch (error$23) {
1941
- logRecoverableError(request, error$23, null), fatalError(request, error$23);
1940
+ } catch (error$26) {
1941
+ logRecoverableError(request, error$26, null), fatalError(request, error$26);
1942
1942
  }
1943
1943
  }
1944
1944
  function resolveServerReference(bundlerConfig, id) {
@@ -2396,8 +2396,8 @@ function parseReadableStream(response, reference, type) {
2396
2396
  (previousBlockedChunk = chunk));
2397
2397
  } else {
2398
2398
  chunk = previousBlockedChunk;
2399
- var chunk$26 = createPendingChunk(response);
2400
- chunk$26.then(
2399
+ var chunk$29 = createPendingChunk(response);
2400
+ chunk$29.then(
2401
2401
  function (v) {
2402
2402
  return controller.enqueue(v);
2403
2403
  },
@@ -2405,10 +2405,10 @@ function parseReadableStream(response, reference, type) {
2405
2405
  return controller.error(e);
2406
2406
  }
2407
2407
  );
2408
- previousBlockedChunk = chunk$26;
2408
+ previousBlockedChunk = chunk$29;
2409
2409
  chunk.then(function () {
2410
- previousBlockedChunk === chunk$26 && (previousBlockedChunk = null);
2411
- resolveModelChunk(chunk$26, json, -1);
2410
+ previousBlockedChunk === chunk$29 && (previousBlockedChunk = null);
2411
+ resolveModelChunk(chunk$29, json, -1);
2412
2412
  });
2413
2413
  }
2414
2414
  },
@@ -201,24 +201,75 @@
201
201
  ((hasProperties = !0), (trimmed[key] = options[key]));
202
202
  return hasProperties ? trimmed : null;
203
203
  }
204
- function prepareStackTrace(error, structuredStackTrace) {
204
+ function collectStackTrace(error, structuredStackTrace) {
205
+ for (
206
+ var result = [], i = framesToSkip;
207
+ i < structuredStackTrace.length;
208
+ i++
209
+ ) {
210
+ var callSite = structuredStackTrace[i],
211
+ _name = callSite.getFunctionName() || "<anonymous>";
212
+ if ("react-stack-bottom-frame" === _name) break;
213
+ else if (callSite.isNative()) result.push([_name, "", 0, 0]);
214
+ else {
215
+ if (callSite.isConstructor()) _name = "new " + _name;
216
+ else if (!callSite.isToplevel()) {
217
+ var callSite$jscomp$0 = callSite;
218
+ _name = callSite$jscomp$0.getTypeName();
219
+ var methodName = callSite$jscomp$0.getMethodName();
220
+ callSite$jscomp$0 = callSite$jscomp$0.getFunctionName();
221
+ var result$jscomp$0 = "";
222
+ callSite$jscomp$0
223
+ ? (_name &&
224
+ identifierRegExp.test(callSite$jscomp$0) &&
225
+ callSite$jscomp$0 !== _name &&
226
+ (result$jscomp$0 += _name + "."),
227
+ (result$jscomp$0 += callSite$jscomp$0),
228
+ !methodName ||
229
+ callSite$jscomp$0 === methodName ||
230
+ callSite$jscomp$0.endsWith("." + methodName) ||
231
+ callSite$jscomp$0.endsWith(" " + methodName) ||
232
+ (result$jscomp$0 += " [as " + methodName + "]"))
233
+ : (_name && (result$jscomp$0 += _name + "."),
234
+ (result$jscomp$0 = methodName
235
+ ? result$jscomp$0 + methodName
236
+ : result$jscomp$0 + "<anonymous>"));
237
+ _name = result$jscomp$0;
238
+ }
239
+ "<anonymous>" === _name && (_name = "");
240
+ methodName = callSite.getScriptNameOrSourceURL() || "<anonymous>";
241
+ "<anonymous>" === methodName && (methodName = "");
242
+ callSite.isEval() &&
243
+ !methodName &&
244
+ (callSite$jscomp$0 = callSite.getEvalOrigin()) &&
245
+ (methodName = callSite$jscomp$0.toString() + ", <anonymous>");
246
+ callSite$jscomp$0 = callSite.getLineNumber() || 0;
247
+ callSite = callSite.getColumnNumber() || 0;
248
+ result.push([_name, methodName, callSite$jscomp$0, callSite]);
249
+ }
250
+ }
205
251
  error = (error.name || "Error") + ": " + (error.message || "");
206
- for (var i = 0; i < structuredStackTrace.length; i++)
252
+ for (i = 0; i < structuredStackTrace.length; i++)
207
253
  error += "\n at " + structuredStackTrace[i].toString();
254
+ collectedStackTrace = result;
208
255
  return error;
209
256
  }
210
257
  function parseStackTrace(error, skipFrames) {
211
- a: {
212
- var previousPrepare = Error.prepareStackTrace;
213
- Error.prepareStackTrace = prepareStackTrace;
214
- try {
215
- var stack = String(error.stack);
216
- break a;
217
- } finally {
218
- Error.prepareStackTrace = previousPrepare;
219
- }
220
- stack = void 0;
258
+ collectedStackTrace = null;
259
+ framesToSkip = skipFrames;
260
+ var previousPrepare = Error.prepareStackTrace;
261
+ Error.prepareStackTrace = collectStackTrace;
262
+ try {
263
+ var stack = String(error.stack);
264
+ } finally {
265
+ Error.prepareStackTrace = previousPrepare;
221
266
  }
267
+ if (null !== collectedStackTrace)
268
+ return (
269
+ (skipFrames = collectedStackTrace),
270
+ (collectedStackTrace = null),
271
+ skipFrames
272
+ );
222
273
  stack.startsWith("Error: react-stack-top-frame\n") &&
223
274
  (stack = stack.slice(29));
224
275
  error = stack.indexOf("react-stack-bottom-frame");
@@ -330,6 +381,12 @@
330
381
  }
331
382
  return null;
332
383
  }
384
+ function prepareStackTrace(error, structuredStackTrace) {
385
+ error = (error.name || "Error") + ": " + (error.message || "");
386
+ for (var i = 0; i < structuredStackTrace.length; i++)
387
+ error += "\n at " + structuredStackTrace[i].toString();
388
+ return error;
389
+ }
333
390
  function resetOwnerStackLimit() {
334
391
  var now = getCurrentTime();
335
392
  1e3 < now - lastResetTime &&
@@ -534,10 +591,17 @@
534
591
  );
535
592
  }
536
593
  function filterStackTrace(request, error, skipFrames) {
594
+ var existing = stackTraceCache.get(error);
595
+ if (void 0 !== existing) {
596
+ error = existing.slice(0);
597
+ for (request = 0; request < error.length; request++)
598
+ error[request] = error[request].slice(0);
599
+ return error;
600
+ }
537
601
  request = request.filterStackFrame;
538
- error = parseStackTrace(error, skipFrames);
539
- for (skipFrames = 0; skipFrames < error.length; skipFrames++) {
540
- var callsite = error[skipFrames],
602
+ skipFrames = parseStackTrace(error, skipFrames);
603
+ for (existing = 0; existing < skipFrames.length; existing++) {
604
+ var callsite = skipFrames[existing],
541
605
  functionName = callsite[0],
542
606
  url = callsite[1];
543
607
  if (url.startsWith("rsc://React/")) {
@@ -548,9 +612,10 @@
548
612
  (url = callsite[1] = url.slice(envIdx + 1, suffixIdx));
549
613
  }
550
614
  request(url, functionName) ||
551
- (error.splice(skipFrames, 1), skipFrames--);
615
+ (skipFrames.splice(existing, 1), existing--);
552
616
  }
553
- return error;
617
+ stackTraceCache.set(error, skipFrames);
618
+ return skipFrames;
554
619
  }
555
620
  function patchConsole(consoleInst, methodName) {
556
621
  var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName);
@@ -3746,7 +3811,10 @@
3746
3811
  }
3747
3812
  }
3748
3813
  };
3749
- var frameRegExp =
3814
+ var framesToSkip = 0,
3815
+ collectedStackTrace = null,
3816
+ identifierRegExp = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/,
3817
+ frameRegExp =
3750
3818
  /^ {3} at (?:(.+) \((?:(.+):(\d+):(\d+)|<anonymous>)\)|(?:async )?(.+):(\d+):(\d+)|<anonymous>)$/,
3751
3819
  supportsRequestStorage = "function" === typeof AsyncLocalStorage,
3752
3820
  requestStorage = supportsRequestStorage ? new AsyncLocalStorage() : null,
@@ -3945,7 +4013,8 @@
3945
4013
  jsxPropsParents = new WeakMap(),
3946
4014
  jsxChildrenParents = new WeakMap(),
3947
4015
  CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"),
3948
- doNotLimit = new WeakSet();
4016
+ doNotLimit = new WeakSet(),
4017
+ stackTraceCache = new WeakMap();
3949
4018
  "object" === typeof console &&
3950
4019
  null !== console &&
3951
4020
  (patchConsole(console, "assert"),
@@ -845,8 +845,8 @@ function serializeReadableStream(request, task, stream) {
845
845
  tryStreamTask(request, streamTask),
846
846
  enqueueFlush(request),
847
847
  reader.read().then(progress, error);
848
- } catch (x$7) {
849
- error(x$7);
848
+ } catch (x$10) {
849
+ error(x$10);
850
850
  }
851
851
  }
852
852
  function error(reason) {
@@ -919,8 +919,8 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
919
919
  tryStreamTask(request, streamTask),
920
920
  enqueueFlush(request),
921
921
  iterator.next().then(progress, error);
922
- } catch (x$8) {
923
- error(x$8);
922
+ } catch (x$11) {
923
+ error(x$11);
924
924
  }
925
925
  }
926
926
  function error(reason) {
@@ -1932,7 +1932,7 @@ function abort(request, reason) {
1932
1932
  }
1933
1933
  var abortListeners = request.abortListeners;
1934
1934
  if (0 < abortListeners.size) {
1935
- var error$22 =
1935
+ var error$25 =
1936
1936
  void 0 === reason
1937
1937
  ? Error("The render was aborted by the server without a reason.")
1938
1938
  : "object" === typeof reason &&
@@ -1941,15 +1941,15 @@ function abort(request, reason) {
1941
1941
  ? Error("The render was aborted by the server with a promise.")
1942
1942
  : reason;
1943
1943
  abortListeners.forEach(function (callback) {
1944
- return callback(error$22);
1944
+ return callback(error$25);
1945
1945
  });
1946
1946
  abortListeners.clear();
1947
1947
  callOnAllReadyIfReady(request);
1948
1948
  }
1949
1949
  null !== request.destination &&
1950
1950
  flushCompletedChunks(request, request.destination);
1951
- } catch (error$23) {
1952
- logRecoverableError(request, error$23, null), fatalError(request, error$23);
1951
+ } catch (error$26) {
1952
+ logRecoverableError(request, error$26, null), fatalError(request, error$26);
1953
1953
  }
1954
1954
  }
1955
1955
  function resolveServerReference(bundlerConfig, id) {
@@ -2398,8 +2398,8 @@ function parseReadableStream(response, reference, type) {
2398
2398
  (previousBlockedChunk = chunk));
2399
2399
  } else {
2400
2400
  chunk = previousBlockedChunk;
2401
- var chunk$26 = createPendingChunk(response);
2402
- chunk$26.then(
2401
+ var chunk$29 = createPendingChunk(response);
2402
+ chunk$29.then(
2403
2403
  function (v) {
2404
2404
  return controller.enqueue(v);
2405
2405
  },
@@ -2407,10 +2407,10 @@ function parseReadableStream(response, reference, type) {
2407
2407
  return controller.error(e);
2408
2408
  }
2409
2409
  );
2410
- previousBlockedChunk = chunk$26;
2410
+ previousBlockedChunk = chunk$29;
2411
2411
  chunk.then(function () {
2412
- previousBlockedChunk === chunk$26 && (previousBlockedChunk = null);
2413
- resolveModelChunk(chunk$26, json, -1);
2412
+ previousBlockedChunk === chunk$29 && (previousBlockedChunk = null);
2413
+ resolveModelChunk(chunk$29, json, -1);
2414
2414
  });
2415
2415
  }
2416
2416
  },
@@ -220,24 +220,75 @@
220
220
  ((hasProperties = !0), (trimmed[key] = options[key]));
221
221
  return hasProperties ? trimmed : null;
222
222
  }
223
- function prepareStackTrace(error, structuredStackTrace) {
223
+ function collectStackTrace(error, structuredStackTrace) {
224
+ for (
225
+ var result = [], i = framesToSkip;
226
+ i < structuredStackTrace.length;
227
+ i++
228
+ ) {
229
+ var callSite = structuredStackTrace[i],
230
+ _name = callSite.getFunctionName() || "<anonymous>";
231
+ if ("react-stack-bottom-frame" === _name) break;
232
+ else if (callSite.isNative()) result.push([_name, "", 0, 0]);
233
+ else {
234
+ if (callSite.isConstructor()) _name = "new " + _name;
235
+ else if (!callSite.isToplevel()) {
236
+ var callSite$jscomp$0 = callSite;
237
+ _name = callSite$jscomp$0.getTypeName();
238
+ var methodName = callSite$jscomp$0.getMethodName();
239
+ callSite$jscomp$0 = callSite$jscomp$0.getFunctionName();
240
+ var result$jscomp$0 = "";
241
+ callSite$jscomp$0
242
+ ? (_name &&
243
+ identifierRegExp.test(callSite$jscomp$0) &&
244
+ callSite$jscomp$0 !== _name &&
245
+ (result$jscomp$0 += _name + "."),
246
+ (result$jscomp$0 += callSite$jscomp$0),
247
+ !methodName ||
248
+ callSite$jscomp$0 === methodName ||
249
+ callSite$jscomp$0.endsWith("." + methodName) ||
250
+ callSite$jscomp$0.endsWith(" " + methodName) ||
251
+ (result$jscomp$0 += " [as " + methodName + "]"))
252
+ : (_name && (result$jscomp$0 += _name + "."),
253
+ (result$jscomp$0 = methodName
254
+ ? result$jscomp$0 + methodName
255
+ : result$jscomp$0 + "<anonymous>"));
256
+ _name = result$jscomp$0;
257
+ }
258
+ "<anonymous>" === _name && (_name = "");
259
+ methodName = callSite.getScriptNameOrSourceURL() || "<anonymous>";
260
+ "<anonymous>" === methodName && (methodName = "");
261
+ callSite.isEval() &&
262
+ !methodName &&
263
+ (callSite$jscomp$0 = callSite.getEvalOrigin()) &&
264
+ (methodName = callSite$jscomp$0.toString() + ", <anonymous>");
265
+ callSite$jscomp$0 = callSite.getLineNumber() || 0;
266
+ callSite = callSite.getColumnNumber() || 0;
267
+ result.push([_name, methodName, callSite$jscomp$0, callSite]);
268
+ }
269
+ }
224
270
  error = (error.name || "Error") + ": " + (error.message || "");
225
- for (var i = 0; i < structuredStackTrace.length; i++)
271
+ for (i = 0; i < structuredStackTrace.length; i++)
226
272
  error += "\n at " + structuredStackTrace[i].toString();
273
+ collectedStackTrace = result;
227
274
  return error;
228
275
  }
229
276
  function parseStackTrace(error, skipFrames) {
230
- a: {
231
- var previousPrepare = Error.prepareStackTrace;
232
- Error.prepareStackTrace = prepareStackTrace;
233
- try {
234
- var stack = String(error.stack);
235
- break a;
236
- } finally {
237
- Error.prepareStackTrace = previousPrepare;
238
- }
239
- stack = void 0;
277
+ collectedStackTrace = null;
278
+ framesToSkip = skipFrames;
279
+ var previousPrepare = Error.prepareStackTrace;
280
+ Error.prepareStackTrace = collectStackTrace;
281
+ try {
282
+ var stack = String(error.stack);
283
+ } finally {
284
+ Error.prepareStackTrace = previousPrepare;
240
285
  }
286
+ if (null !== collectedStackTrace)
287
+ return (
288
+ (skipFrames = collectedStackTrace),
289
+ (collectedStackTrace = null),
290
+ skipFrames
291
+ );
241
292
  stack.startsWith("Error: react-stack-top-frame\n") &&
242
293
  (stack = stack.slice(29));
243
294
  error = stack.indexOf("react-stack-bottom-frame");
@@ -354,6 +405,12 @@
354
405
  var owner = componentStorage.getStore();
355
406
  return owner ? owner : null;
356
407
  }
408
+ function prepareStackTrace(error, structuredStackTrace) {
409
+ error = (error.name || "Error") + ": " + (error.message || "");
410
+ for (var i = 0; i < structuredStackTrace.length; i++)
411
+ error += "\n at " + structuredStackTrace[i].toString();
412
+ return error;
413
+ }
357
414
  function resetOwnerStackLimit() {
358
415
  var now = getCurrentTime();
359
416
  1e3 < now - lastResetTime &&
@@ -558,10 +615,17 @@
558
615
  );
559
616
  }
560
617
  function filterStackTrace(request, error, skipFrames) {
618
+ var existing = stackTraceCache.get(error);
619
+ if (void 0 !== existing) {
620
+ error = existing.slice(0);
621
+ for (request = 0; request < error.length; request++)
622
+ error[request] = error[request].slice(0);
623
+ return error;
624
+ }
561
625
  request = request.filterStackFrame;
562
- error = parseStackTrace(error, skipFrames);
563
- for (skipFrames = 0; skipFrames < error.length; skipFrames++) {
564
- var callsite = error[skipFrames],
626
+ skipFrames = parseStackTrace(error, skipFrames);
627
+ for (existing = 0; existing < skipFrames.length; existing++) {
628
+ var callsite = skipFrames[existing],
565
629
  functionName = callsite[0],
566
630
  url = callsite[1];
567
631
  if (url.startsWith("rsc://React/")) {
@@ -572,9 +636,10 @@
572
636
  (url = callsite[1] = url.slice(envIdx + 1, suffixIdx));
573
637
  }
574
638
  request(url, functionName) ||
575
- (error.splice(skipFrames, 1), skipFrames--);
639
+ (skipFrames.splice(existing, 1), existing--);
576
640
  }
577
- return error;
641
+ stackTraceCache.set(error, skipFrames);
642
+ return skipFrames;
578
643
  }
579
644
  function patchConsole(consoleInst, methodName) {
580
645
  var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName);
@@ -3740,7 +3805,10 @@
3740
3805
  }
3741
3806
  }
3742
3807
  };
3743
- var frameRegExp =
3808
+ var framesToSkip = 0,
3809
+ collectedStackTrace = null,
3810
+ identifierRegExp = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/,
3811
+ frameRegExp =
3744
3812
  /^ {3} at (?:(.+) \((?:(.+):(\d+):(\d+)|<anonymous>)\)|(?:async )?(.+):(\d+):(\d+)|<anonymous>)$/,
3745
3813
  requestStorage = new async_hooks.AsyncLocalStorage(),
3746
3814
  componentStorage = new async_hooks.AsyncLocalStorage(),
@@ -3942,7 +4010,8 @@
3942
4010
  jsxPropsParents = new WeakMap(),
3943
4011
  jsxChildrenParents = new WeakMap(),
3944
4012
  CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"),
3945
- doNotLimit = new WeakSet();
4013
+ doNotLimit = new WeakSet(),
4014
+ stackTraceCache = new WeakMap();
3946
4015
  "object" === typeof console &&
3947
4016
  null !== console &&
3948
4017
  (patchConsole(console, "assert"),
@@ -4093,12 +4162,12 @@
4093
4162
  "React doesn't accept base64 encoded file uploads because we don't expect form data passed from a browser to ever encode data that way. If that's the wrong assumption, we can easily fix it."
4094
4163
  );
4095
4164
  pendingFiles++;
4096
- var JSCompiler_object_inline_chunks_153 = [];
4165
+ var JSCompiler_object_inline_chunks_156 = [];
4097
4166
  value.on("data", function (chunk) {
4098
- JSCompiler_object_inline_chunks_153.push(chunk);
4167
+ JSCompiler_object_inline_chunks_156.push(chunk);
4099
4168
  });
4100
4169
  value.on("end", function () {
4101
- var blob = new Blob(JSCompiler_object_inline_chunks_153, {
4170
+ var blob = new Blob(JSCompiler_object_inline_chunks_156, {
4102
4171
  type: mimeType
4103
4172
  });
4104
4173
  response._formData.append(name, blob, filename);
@@ -862,8 +862,8 @@ function serializeReadableStream(request, task, stream) {
862
862
  tryStreamTask(request, streamTask),
863
863
  enqueueFlush(request),
864
864
  reader.read().then(progress, error);
865
- } catch (x$7) {
866
- error(x$7);
865
+ } catch (x$10) {
866
+ error(x$10);
867
867
  }
868
868
  }
869
869
  function error(reason) {
@@ -936,8 +936,8 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
936
936
  tryStreamTask(request, streamTask),
937
937
  enqueueFlush(request),
938
938
  iterator.next().then(progress, error);
939
- } catch (x$8) {
940
- error(x$8);
939
+ } catch (x$11) {
940
+ error(x$11);
941
941
  }
942
942
  }
943
943
  function error(reason) {
@@ -1957,7 +1957,7 @@ function abort(request, reason) {
1957
1957
  }
1958
1958
  var abortListeners = request.abortListeners;
1959
1959
  if (0 < abortListeners.size) {
1960
- var error$22 =
1960
+ var error$25 =
1961
1961
  void 0 === reason
1962
1962
  ? Error("The render was aborted by the server without a reason.")
1963
1963
  : "object" === typeof reason &&
@@ -1966,15 +1966,15 @@ function abort(request, reason) {
1966
1966
  ? Error("The render was aborted by the server with a promise.")
1967
1967
  : reason;
1968
1968
  abortListeners.forEach(function (callback) {
1969
- return callback(error$22);
1969
+ return callback(error$25);
1970
1970
  });
1971
1971
  abortListeners.clear();
1972
1972
  callOnAllReadyIfReady(request);
1973
1973
  }
1974
1974
  null !== request.destination &&
1975
1975
  flushCompletedChunks(request, request.destination);
1976
- } catch (error$23) {
1977
- logRecoverableError(request, error$23, null), fatalError(request, error$23);
1976
+ } catch (error$26) {
1977
+ logRecoverableError(request, error$26, null), fatalError(request, error$26);
1978
1978
  }
1979
1979
  }
1980
1980
  function resolveServerReference(bundlerConfig, id) {
@@ -2423,8 +2423,8 @@ function parseReadableStream(response, reference, type) {
2423
2423
  (previousBlockedChunk = chunk));
2424
2424
  } else {
2425
2425
  chunk = previousBlockedChunk;
2426
- var chunk$26 = createPendingChunk(response);
2427
- chunk$26.then(
2426
+ var chunk$29 = createPendingChunk(response);
2427
+ chunk$29.then(
2428
2428
  function (v) {
2429
2429
  return controller.enqueue(v);
2430
2430
  },
@@ -2432,10 +2432,10 @@ function parseReadableStream(response, reference, type) {
2432
2432
  return controller.error(e);
2433
2433
  }
2434
2434
  );
2435
- previousBlockedChunk = chunk$26;
2435
+ previousBlockedChunk = chunk$29;
2436
2436
  chunk.then(function () {
2437
- previousBlockedChunk === chunk$26 && (previousBlockedChunk = null);
2438
- resolveModelChunk(chunk$26, json, -1);
2437
+ previousBlockedChunk === chunk$29 && (previousBlockedChunk = null);
2438
+ resolveModelChunk(chunk$29, json, -1);
2439
2439
  });
2440
2440
  }
2441
2441
  },
@@ -2808,12 +2808,12 @@ exports.decodeReplyFromBusboy = function (busboyStream, webpackMap, options) {
2808
2808
  "React doesn't accept base64 encoded file uploads because we don't expect form data passed from a browser to ever encode data that way. If that's the wrong assumption, we can easily fix it."
2809
2809
  );
2810
2810
  pendingFiles++;
2811
- var JSCompiler_object_inline_chunks_221 = [];
2811
+ var JSCompiler_object_inline_chunks_233 = [];
2812
2812
  value.on("data", function (chunk) {
2813
- JSCompiler_object_inline_chunks_221.push(chunk);
2813
+ JSCompiler_object_inline_chunks_233.push(chunk);
2814
2814
  });
2815
2815
  value.on("end", function () {
2816
- var blob = new Blob(JSCompiler_object_inline_chunks_221, {
2816
+ var blob = new Blob(JSCompiler_object_inline_chunks_233, {
2817
2817
  type: mimeType
2818
2818
  });
2819
2819
  response._formData.append(name, blob, filename);
@@ -220,24 +220,75 @@
220
220
  ((hasProperties = !0), (trimmed[key] = options[key]));
221
221
  return hasProperties ? trimmed : null;
222
222
  }
223
- function prepareStackTrace(error, structuredStackTrace) {
223
+ function collectStackTrace(error, structuredStackTrace) {
224
+ for (
225
+ var result = [], i = framesToSkip;
226
+ i < structuredStackTrace.length;
227
+ i++
228
+ ) {
229
+ var callSite = structuredStackTrace[i],
230
+ _name = callSite.getFunctionName() || "<anonymous>";
231
+ if ("react-stack-bottom-frame" === _name) break;
232
+ else if (callSite.isNative()) result.push([_name, "", 0, 0]);
233
+ else {
234
+ if (callSite.isConstructor()) _name = "new " + _name;
235
+ else if (!callSite.isToplevel()) {
236
+ var callSite$jscomp$0 = callSite;
237
+ _name = callSite$jscomp$0.getTypeName();
238
+ var methodName = callSite$jscomp$0.getMethodName();
239
+ callSite$jscomp$0 = callSite$jscomp$0.getFunctionName();
240
+ var result$jscomp$0 = "";
241
+ callSite$jscomp$0
242
+ ? (_name &&
243
+ identifierRegExp.test(callSite$jscomp$0) &&
244
+ callSite$jscomp$0 !== _name &&
245
+ (result$jscomp$0 += _name + "."),
246
+ (result$jscomp$0 += callSite$jscomp$0),
247
+ !methodName ||
248
+ callSite$jscomp$0 === methodName ||
249
+ callSite$jscomp$0.endsWith("." + methodName) ||
250
+ callSite$jscomp$0.endsWith(" " + methodName) ||
251
+ (result$jscomp$0 += " [as " + methodName + "]"))
252
+ : (_name && (result$jscomp$0 += _name + "."),
253
+ (result$jscomp$0 = methodName
254
+ ? result$jscomp$0 + methodName
255
+ : result$jscomp$0 + "<anonymous>"));
256
+ _name = result$jscomp$0;
257
+ }
258
+ "<anonymous>" === _name && (_name = "");
259
+ methodName = callSite.getScriptNameOrSourceURL() || "<anonymous>";
260
+ "<anonymous>" === methodName && (methodName = "");
261
+ callSite.isEval() &&
262
+ !methodName &&
263
+ (callSite$jscomp$0 = callSite.getEvalOrigin()) &&
264
+ (methodName = callSite$jscomp$0.toString() + ", <anonymous>");
265
+ callSite$jscomp$0 = callSite.getLineNumber() || 0;
266
+ callSite = callSite.getColumnNumber() || 0;
267
+ result.push([_name, methodName, callSite$jscomp$0, callSite]);
268
+ }
269
+ }
224
270
  error = (error.name || "Error") + ": " + (error.message || "");
225
- for (var i = 0; i < structuredStackTrace.length; i++)
271
+ for (i = 0; i < structuredStackTrace.length; i++)
226
272
  error += "\n at " + structuredStackTrace[i].toString();
273
+ collectedStackTrace = result;
227
274
  return error;
228
275
  }
229
276
  function parseStackTrace(error, skipFrames) {
230
- a: {
231
- var previousPrepare = Error.prepareStackTrace;
232
- Error.prepareStackTrace = prepareStackTrace;
233
- try {
234
- var stack = String(error.stack);
235
- break a;
236
- } finally {
237
- Error.prepareStackTrace = previousPrepare;
238
- }
239
- stack = void 0;
277
+ collectedStackTrace = null;
278
+ framesToSkip = skipFrames;
279
+ var previousPrepare = Error.prepareStackTrace;
280
+ Error.prepareStackTrace = collectStackTrace;
281
+ try {
282
+ var stack = String(error.stack);
283
+ } finally {
284
+ Error.prepareStackTrace = previousPrepare;
240
285
  }
286
+ if (null !== collectedStackTrace)
287
+ return (
288
+ (skipFrames = collectedStackTrace),
289
+ (collectedStackTrace = null),
290
+ skipFrames
291
+ );
241
292
  stack.startsWith("Error: react-stack-top-frame\n") &&
242
293
  (stack = stack.slice(29));
243
294
  error = stack.indexOf("react-stack-bottom-frame");
@@ -354,6 +405,12 @@
354
405
  var owner = componentStorage.getStore();
355
406
  return owner ? owner : null;
356
407
  }
408
+ function prepareStackTrace(error, structuredStackTrace) {
409
+ error = (error.name || "Error") + ": " + (error.message || "");
410
+ for (var i = 0; i < structuredStackTrace.length; i++)
411
+ error += "\n at " + structuredStackTrace[i].toString();
412
+ return error;
413
+ }
357
414
  function resetOwnerStackLimit() {
358
415
  var now = getCurrentTime();
359
416
  1e3 < now - lastResetTime &&
@@ -558,10 +615,17 @@
558
615
  );
559
616
  }
560
617
  function filterStackTrace(request, error, skipFrames) {
618
+ var existing = stackTraceCache.get(error);
619
+ if (void 0 !== existing) {
620
+ error = existing.slice(0);
621
+ for (request = 0; request < error.length; request++)
622
+ error[request] = error[request].slice(0);
623
+ return error;
624
+ }
561
625
  request = request.filterStackFrame;
562
- error = parseStackTrace(error, skipFrames);
563
- for (skipFrames = 0; skipFrames < error.length; skipFrames++) {
564
- var callsite = error[skipFrames],
626
+ skipFrames = parseStackTrace(error, skipFrames);
627
+ for (existing = 0; existing < skipFrames.length; existing++) {
628
+ var callsite = skipFrames[existing],
565
629
  functionName = callsite[0],
566
630
  url = callsite[1];
567
631
  if (url.startsWith("rsc://React/")) {
@@ -572,9 +636,10 @@
572
636
  (url = callsite[1] = url.slice(envIdx + 1, suffixIdx));
573
637
  }
574
638
  request(url, functionName) ||
575
- (error.splice(skipFrames, 1), skipFrames--);
639
+ (skipFrames.splice(existing, 1), existing--);
576
640
  }
577
- return error;
641
+ stackTraceCache.set(error, skipFrames);
642
+ return skipFrames;
578
643
  }
579
644
  function patchConsole(consoleInst, methodName) {
580
645
  var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName);
@@ -3703,7 +3768,10 @@
3703
3768
  }
3704
3769
  }
3705
3770
  };
3706
- var frameRegExp =
3771
+ var framesToSkip = 0,
3772
+ collectedStackTrace = null,
3773
+ identifierRegExp = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/,
3774
+ frameRegExp =
3707
3775
  /^ {3} at (?:(.+) \((?:(.+):(\d+):(\d+)|<anonymous>)\)|(?:async )?(.+):(\d+):(\d+)|<anonymous>)$/,
3708
3776
  requestStorage = new async_hooks.AsyncLocalStorage(),
3709
3777
  componentStorage = new async_hooks.AsyncLocalStorage(),
@@ -3905,7 +3973,8 @@
3905
3973
  jsxPropsParents = new WeakMap(),
3906
3974
  jsxChildrenParents = new WeakMap(),
3907
3975
  CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"),
3908
- doNotLimit = new WeakSet();
3976
+ doNotLimit = new WeakSet(),
3977
+ stackTraceCache = new WeakMap();
3909
3978
  "object" === typeof console &&
3910
3979
  null !== console &&
3911
3980
  (patchConsole(console, "assert"),
@@ -4056,12 +4125,12 @@
4056
4125
  "React doesn't accept base64 encoded file uploads because we don't expect form data passed from a browser to ever encode data that way. If that's the wrong assumption, we can easily fix it."
4057
4126
  );
4058
4127
  pendingFiles++;
4059
- var JSCompiler_object_inline_chunks_153 = [];
4128
+ var JSCompiler_object_inline_chunks_156 = [];
4060
4129
  value.on("data", function (chunk) {
4061
- JSCompiler_object_inline_chunks_153.push(chunk);
4130
+ JSCompiler_object_inline_chunks_156.push(chunk);
4062
4131
  });
4063
4132
  value.on("end", function () {
4064
- var blob = new Blob(JSCompiler_object_inline_chunks_153, {
4133
+ var blob = new Blob(JSCompiler_object_inline_chunks_156, {
4065
4134
  type: mimeType
4066
4135
  });
4067
4136
  response._formData.append(name, blob, filename);
@@ -862,8 +862,8 @@ function serializeReadableStream(request, task, stream) {
862
862
  tryStreamTask(request, streamTask),
863
863
  enqueueFlush(request),
864
864
  reader.read().then(progress, error);
865
- } catch (x$7) {
866
- error(x$7);
865
+ } catch (x$10) {
866
+ error(x$10);
867
867
  }
868
868
  }
869
869
  function error(reason) {
@@ -936,8 +936,8 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
936
936
  tryStreamTask(request, streamTask),
937
937
  enqueueFlush(request),
938
938
  iterator.next().then(progress, error);
939
- } catch (x$8) {
940
- error(x$8);
939
+ } catch (x$11) {
940
+ error(x$11);
941
941
  }
942
942
  }
943
943
  function error(reason) {
@@ -1957,7 +1957,7 @@ function abort(request, reason) {
1957
1957
  }
1958
1958
  var abortListeners = request.abortListeners;
1959
1959
  if (0 < abortListeners.size) {
1960
- var error$22 =
1960
+ var error$25 =
1961
1961
  void 0 === reason
1962
1962
  ? Error("The render was aborted by the server without a reason.")
1963
1963
  : "object" === typeof reason &&
@@ -1966,15 +1966,15 @@ function abort(request, reason) {
1966
1966
  ? Error("The render was aborted by the server with a promise.")
1967
1967
  : reason;
1968
1968
  abortListeners.forEach(function (callback) {
1969
- return callback(error$22);
1969
+ return callback(error$25);
1970
1970
  });
1971
1971
  abortListeners.clear();
1972
1972
  callOnAllReadyIfReady(request);
1973
1973
  }
1974
1974
  null !== request.destination &&
1975
1975
  flushCompletedChunks(request, request.destination);
1976
- } catch (error$23) {
1977
- logRecoverableError(request, error$23, null), fatalError(request, error$23);
1976
+ } catch (error$26) {
1977
+ logRecoverableError(request, error$26, null), fatalError(request, error$26);
1978
1978
  }
1979
1979
  }
1980
1980
  function resolveServerReference(bundlerConfig, id) {
@@ -2389,8 +2389,8 @@ function parseReadableStream(response, reference, type) {
2389
2389
  (previousBlockedChunk = chunk));
2390
2390
  } else {
2391
2391
  chunk = previousBlockedChunk;
2392
- var chunk$26 = createPendingChunk(response);
2393
- chunk$26.then(
2392
+ var chunk$29 = createPendingChunk(response);
2393
+ chunk$29.then(
2394
2394
  function (v) {
2395
2395
  return controller.enqueue(v);
2396
2396
  },
@@ -2398,10 +2398,10 @@ function parseReadableStream(response, reference, type) {
2398
2398
  return controller.error(e);
2399
2399
  }
2400
2400
  );
2401
- previousBlockedChunk = chunk$26;
2401
+ previousBlockedChunk = chunk$29;
2402
2402
  chunk.then(function () {
2403
- previousBlockedChunk === chunk$26 && (previousBlockedChunk = null);
2404
- resolveModelChunk(chunk$26, json, -1);
2403
+ previousBlockedChunk === chunk$29 && (previousBlockedChunk = null);
2404
+ resolveModelChunk(chunk$29, json, -1);
2405
2405
  });
2406
2406
  }
2407
2407
  },
@@ -2774,12 +2774,12 @@ exports.decodeReplyFromBusboy = function (busboyStream, webpackMap, options) {
2774
2774
  "React doesn't accept base64 encoded file uploads because we don't expect form data passed from a browser to ever encode data that way. If that's the wrong assumption, we can easily fix it."
2775
2775
  );
2776
2776
  pendingFiles++;
2777
- var JSCompiler_object_inline_chunks_221 = [];
2777
+ var JSCompiler_object_inline_chunks_233 = [];
2778
2778
  value.on("data", function (chunk) {
2779
- JSCompiler_object_inline_chunks_221.push(chunk);
2779
+ JSCompiler_object_inline_chunks_233.push(chunk);
2780
2780
  });
2781
2781
  value.on("end", function () {
2782
- var blob = new Blob(JSCompiler_object_inline_chunks_221, {
2782
+ var blob = new Blob(JSCompiler_object_inline_chunks_233, {
2783
2783
  type: mimeType
2784
2784
  });
2785
2785
  response._formData.append(name, blob, filename);
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.2.0-canary-b9cfa0d3-20250505",
4
+ "version": "19.2.0-canary-0ff1d13b-20250507",
5
5
  "keywords": [
6
6
  "react"
7
7
  ],
@@ -99,8 +99,8 @@
99
99
  "node": ">=0.10.0"
100
100
  },
101
101
  "peerDependencies": {
102
- "react": "19.2.0-canary-b9cfa0d3-20250505",
103
- "react-dom": "19.2.0-canary-b9cfa0d3-20250505",
102
+ "react": "19.2.0-canary-0ff1d13b-20250507",
103
+ "react-dom": "19.2.0-canary-0ff1d13b-20250507",
104
104
  "webpack": "^5.59.0"
105
105
  },
106
106
  "dependencies": {