react-server-dom-webpack 19.2.0-canary-280ff6fe-20250606 → 19.2.0-canary-56408a5b-20250610

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.
@@ -861,17 +861,22 @@
861
861
  task.debugStack,
862
862
  task.debugTask
863
863
  );
864
- (task = thenable._debugInfo) &&
865
- forwardDebugInfo(request, newTask.id, task);
866
864
  switch (thenable.status) {
867
865
  case "fulfilled":
868
866
  return (
867
+ (task = thenable._debugInfo) &&
868
+ forwardDebugInfo(request, newTask, task),
869
869
  (newTask.model = thenable.value),
870
870
  pingTask(request, newTask),
871
871
  newTask.id
872
872
  );
873
873
  case "rejected":
874
- return erroredTask(request, newTask, thenable.reason), newTask.id;
874
+ return (
875
+ (task = thenable._debugInfo) &&
876
+ forwardDebugInfo(request, newTask, task),
877
+ erroredTask(request, newTask, thenable.reason),
878
+ newTask.id
879
+ );
875
880
  default:
876
881
  if (request.status === ABORTING)
877
882
  return (
@@ -897,10 +902,14 @@
897
902
  }
898
903
  thenable.then(
899
904
  function (value) {
905
+ var _debugInfo2 = thenable._debugInfo;
906
+ _debugInfo2 && forwardDebugInfo(request, newTask, _debugInfo2);
900
907
  newTask.model = value;
901
908
  pingTask(request, newTask);
902
909
  },
903
910
  function (reason) {
911
+ var _debugInfo3 = thenable._debugInfo;
912
+ _debugInfo3 && forwardDebugInfo(request, newTask, _debugInfo3);
904
913
  newTask.status === PENDING$1 &&
905
914
  (erroredTask(request, newTask, reason), enqueueFlush(request));
906
915
  }
@@ -1042,7 +1051,7 @@
1042
1051
  task = streamTask.id.toString(16) + ":" + (isIterator ? "x" : "X") + "\n";
1043
1052
  request.completedRegularChunks.push(stringToChunk(task));
1044
1053
  (iterable = iterable._debugInfo) &&
1045
- forwardDebugInfo(request, streamTask.id, iterable);
1054
+ forwardDebugInfo(request, streamTask, iterable);
1046
1055
  var aborted = !1;
1047
1056
  request.abortListeners.add(abortIterable);
1048
1057
  callIteratorInDEV(iterator, progress, error);
@@ -1182,33 +1191,34 @@
1182
1191
  ) {
1183
1192
  var prevThenableState = task.thenableState;
1184
1193
  task.thenableState = null;
1185
- if (null === debugID) return outlineTask(request, task);
1186
- if (null !== prevThenableState)
1187
- var componentDebugInfo = prevThenableState._componentDebugInfo;
1188
- else {
1189
- var componentDebugID = debugID;
1190
- componentDebugInfo = Component.displayName || Component.name || "";
1191
- var componentEnv = (0, request.environmentName)();
1192
- request.pendingChunks++;
1193
- componentDebugInfo = {
1194
- name: componentDebugInfo,
1195
- env: componentEnv,
1196
- key: key,
1197
- owner: task.debugOwner
1198
- };
1199
- componentDebugInfo.stack =
1200
- null === task.debugStack
1201
- ? null
1202
- : filterStackTrace(request, parseStackTrace(task.debugStack, 1));
1203
- componentDebugInfo.props = props;
1204
- componentDebugInfo.debugStack = task.debugStack;
1205
- componentDebugInfo.debugTask = task.debugTask;
1206
- outlineComponentInfo(request, componentDebugInfo);
1207
- emitDebugChunk(request, componentDebugID, componentDebugInfo);
1208
- task.environmentName = componentEnv;
1209
- 2 === validated &&
1210
- warnForMissingKey(request, key, componentDebugInfo, task.debugTask);
1211
- }
1194
+ if (canEmitDebugInfo)
1195
+ if (null !== prevThenableState)
1196
+ var componentDebugInfo = prevThenableState._componentDebugInfo;
1197
+ else {
1198
+ var componentDebugID = task.id;
1199
+ componentDebugInfo = Component.displayName || Component.name || "";
1200
+ var componentEnv = (0, request.environmentName)();
1201
+ request.pendingChunks++;
1202
+ componentDebugInfo = {
1203
+ name: componentDebugInfo,
1204
+ env: componentEnv,
1205
+ key: key,
1206
+ owner: task.debugOwner
1207
+ };
1208
+ componentDebugInfo.stack =
1209
+ null === task.debugStack
1210
+ ? null
1211
+ : filterStackTrace(request, parseStackTrace(task.debugStack, 1));
1212
+ componentDebugInfo.props = props;
1213
+ componentDebugInfo.debugStack = task.debugStack;
1214
+ componentDebugInfo.debugTask = task.debugTask;
1215
+ outlineComponentInfo(request, componentDebugInfo);
1216
+ emitDebugChunk(request, componentDebugID, componentDebugInfo);
1217
+ task.environmentName = componentEnv;
1218
+ 2 === validated &&
1219
+ warnForMissingKey(request, key, componentDebugInfo, task.debugTask);
1220
+ }
1221
+ else return outlineTask(request, task);
1212
1222
  thenableIndexCounter = 0;
1213
1223
  thenableState = prevThenableState;
1214
1224
  currentComponentDebugInfo = componentDebugInfo;
@@ -1335,8 +1345,8 @@
1335
1345
  task.implicitSlot ? [request] : request
1336
1346
  );
1337
1347
  if ((i = children._debugInfo)) {
1338
- if (null === debugID) return outlineTask(request, task);
1339
- forwardDebugInfo(request, debugID, i);
1348
+ if (canEmitDebugInfo) forwardDebugInfo(request, task, i);
1349
+ else return outlineTask(request, task);
1340
1350
  children = Array.from(children);
1341
1351
  }
1342
1352
  return children;
@@ -1868,10 +1878,10 @@
1868
1878
  _writtenObjects.set(value, elementReference)));
1869
1879
  }
1870
1880
  if (serializedSize > MAX_ROW_SIZE) return deferTask(request, task);
1871
- if ((_existingReference = value._debugInfo)) {
1872
- if (null === debugID) return outlineTask(request, task);
1873
- forwardDebugInfo(request, debugID, _existingReference);
1874
- }
1881
+ if ((_existingReference = value._debugInfo))
1882
+ if (canEmitDebugInfo)
1883
+ forwardDebugInfo(request, task, _existingReference);
1884
+ else return outlineTask(request, task);
1875
1885
  _existingReference = value.props;
1876
1886
  var refProp = _existingReference.ref;
1877
1887
  task.debugOwner = value._owner;
@@ -1897,10 +1907,10 @@
1897
1907
  task.thenableState = null;
1898
1908
  elementReference = callLazyInitInDEV(value);
1899
1909
  if (request.status === ABORTING) throw null;
1900
- if ((_writtenObjects = value._debugInfo)) {
1901
- if (null === debugID) return outlineTask(request, task);
1902
- forwardDebugInfo(request, debugID, _writtenObjects);
1903
- }
1910
+ if ((_writtenObjects = value._debugInfo))
1911
+ if (canEmitDebugInfo)
1912
+ forwardDebugInfo(request, task, _writtenObjects);
1913
+ else return outlineTask(request, task);
1904
1914
  return renderModelDestructive(
1905
1915
  request,
1906
1916
  task,
@@ -2274,11 +2284,19 @@
2274
2284
  objectLimit = { objectLimit: objectLimit };
2275
2285
  var componentDebugInfo = {
2276
2286
  name: componentInfo.name,
2277
- env: componentInfo.env,
2278
- key: componentInfo.key,
2279
- owner: componentInfo.owner
2287
+ key: componentInfo.key
2280
2288
  };
2281
- componentDebugInfo.stack = componentInfo.stack;
2289
+ null != componentInfo.env &&
2290
+ (componentDebugInfo.env = componentInfo.env);
2291
+ null != componentInfo.owner &&
2292
+ (componentDebugInfo.owner = componentInfo.owner);
2293
+ null == componentInfo.stack && null != componentInfo.debugStack
2294
+ ? (componentDebugInfo.stack = filterStackTrace(
2295
+ request,
2296
+ parseStackTrace(componentInfo.debugStack, 1)
2297
+ ))
2298
+ : null != componentInfo.stack &&
2299
+ (componentDebugInfo.stack = componentInfo.stack);
2282
2300
  componentDebugInfo.props = componentInfo.props;
2283
2301
  objectLimit = outlineConsoleValue(
2284
2302
  request,
@@ -2596,46 +2614,66 @@
2596
2614
  methodName = stringToChunk(":W" + json + "\n");
2597
2615
  request.completedRegularChunks.push(methodName);
2598
2616
  }
2599
- function forwardDebugInfo(request$jscomp$0, id$jscomp$0, debugInfo) {
2600
- for (var i = 0; i < debugInfo.length; i++)
2601
- if ("number" !== typeof debugInfo[i].time)
2602
- if (
2603
- (request$jscomp$0.pendingChunks++,
2604
- "string" === typeof debugInfo[i].name)
2605
- )
2606
- outlineComponentInfo(request$jscomp$0, debugInfo[i]),
2607
- emitDebugChunk(request$jscomp$0, id$jscomp$0, debugInfo[i]);
2608
- else if (debugInfo[i].awaited) {
2609
- var ioInfo = debugInfo[i].awaited;
2610
- var request = request$jscomp$0,
2611
- ioInfo$jscomp$0 = ioInfo;
2612
- if (!request.writtenObjects.has(ioInfo$jscomp$0)) {
2613
- request.pendingChunks++;
2614
- var id = request.nextChunkId++,
2615
- owner = ioInfo$jscomp$0.owner;
2616
- null != owner && outlineComponentInfo(request, owner);
2617
- emitIOInfoChunk(
2618
- request,
2619
- id,
2620
- ioInfo$jscomp$0.name,
2621
- ioInfo$jscomp$0.start,
2622
- ioInfo$jscomp$0.end,
2623
- ioInfo$jscomp$0.env,
2624
- owner,
2625
- ioInfo$jscomp$0.stack
2626
- );
2627
- request.writtenObjects.set(
2628
- ioInfo$jscomp$0,
2629
- serializeByValueID(id)
2630
- );
2617
+ function forwardDebugInfo(request$jscomp$0, task, debugInfo) {
2618
+ task = task.id;
2619
+ for (var i = 0; i < debugInfo.length; i++) {
2620
+ var info = debugInfo[i];
2621
+ if ("number" !== typeof info.time)
2622
+ if ("string" === typeof info.name)
2623
+ outlineComponentInfo(request$jscomp$0, info),
2624
+ request$jscomp$0.pendingChunks++,
2625
+ emitDebugChunk(request$jscomp$0, task, info);
2626
+ else if (info.awaited) {
2627
+ var ioInfo = info.awaited;
2628
+ if (!(ioInfo.end <= request$jscomp$0.timeOrigin)) {
2629
+ var request = request$jscomp$0,
2630
+ ioInfo$jscomp$0 = ioInfo;
2631
+ if (!request.writtenObjects.has(ioInfo$jscomp$0)) {
2632
+ request.pendingChunks++;
2633
+ var id = request.nextChunkId++,
2634
+ owner = ioInfo$jscomp$0.owner;
2635
+ null != owner && outlineComponentInfo(request, owner);
2636
+ var debugStack =
2637
+ null == ioInfo$jscomp$0.stack &&
2638
+ null != ioInfo$jscomp$0.debugStack
2639
+ ? filterStackTrace(
2640
+ request,
2641
+ parseStackTrace(ioInfo$jscomp$0.debugStack, 1)
2642
+ )
2643
+ : ioInfo$jscomp$0.stack;
2644
+ emitIOInfoChunk(
2645
+ request,
2646
+ id,
2647
+ ioInfo$jscomp$0.name,
2648
+ ioInfo$jscomp$0.start,
2649
+ ioInfo$jscomp$0.end,
2650
+ ioInfo$jscomp$0.env,
2651
+ owner,
2652
+ debugStack
2653
+ );
2654
+ request.writtenObjects.set(
2655
+ ioInfo$jscomp$0,
2656
+ serializeByValueID(id)
2657
+ );
2658
+ }
2659
+ debugStack =
2660
+ null == info.stack && null != info.debugStack
2661
+ ? filterStackTrace(
2662
+ request$jscomp$0,
2663
+ parseStackTrace(info.debugStack, 1)
2664
+ )
2665
+ : info.stack;
2666
+ ioInfo = { awaited: ioInfo };
2667
+ null != info.env && (ioInfo.env = info.env);
2668
+ null != info.owner && (ioInfo.owner = info.owner);
2669
+ null != debugStack && (ioInfo.stack = debugStack);
2670
+ request$jscomp$0.pendingChunks++;
2671
+ emitDebugChunk(request$jscomp$0, task, ioInfo);
2631
2672
  }
2632
- emitDebugChunk(request$jscomp$0, id$jscomp$0, {
2633
- awaited: ioInfo,
2634
- env: debugInfo[i].env,
2635
- owner: debugInfo[i].owner,
2636
- stack: debugInfo[i].stack
2637
- });
2638
- } else emitDebugChunk(request$jscomp$0, id$jscomp$0, debugInfo[i]);
2673
+ } else
2674
+ request$jscomp$0.pendingChunks++,
2675
+ emitDebugChunk(request$jscomp$0, task, info);
2676
+ }
2639
2677
  }
2640
2678
  function emitChunk(request, task, value) {
2641
2679
  var id = task.id;
@@ -2679,12 +2717,12 @@
2679
2717
  }
2680
2718
  function retryTask(request, task) {
2681
2719
  if (task.status === PENDING$1) {
2682
- var prevDebugID = debugID;
2720
+ var prevCanEmitDebugInfo = canEmitDebugInfo;
2683
2721
  task.status = RENDERING;
2684
2722
  var parentSerializedSize = serializedSize;
2685
2723
  try {
2686
2724
  modelRoot = task.model;
2687
- debugID = task.id;
2725
+ canEmitDebugInfo = !0;
2688
2726
  var resolvedModel = renderModelDestructive(
2689
2727
  request,
2690
2728
  task,
@@ -2692,7 +2730,7 @@
2692
2730
  "",
2693
2731
  task.model
2694
2732
  );
2695
- debugID = null;
2733
+ canEmitDebugInfo = !1;
2696
2734
  modelRoot = resolvedModel;
2697
2735
  task.keyPath = null;
2698
2736
  task.implicitSlot = !1;
@@ -2736,18 +2774,20 @@
2736
2774
  } else erroredTask(request, task, x);
2737
2775
  }
2738
2776
  } finally {
2739
- (debugID = prevDebugID), (serializedSize = parentSerializedSize);
2777
+ (canEmitDebugInfo = prevCanEmitDebugInfo),
2778
+ (serializedSize = parentSerializedSize);
2740
2779
  }
2741
2780
  }
2742
2781
  }
2743
2782
  function tryStreamTask(request, task) {
2744
- var prevDebugID = debugID;
2745
- debugID = null;
2783
+ var prevCanEmitDebugInfo = canEmitDebugInfo;
2784
+ canEmitDebugInfo = !1;
2746
2785
  var parentSerializedSize = serializedSize;
2747
2786
  try {
2748
2787
  emitChunk(request, task, task.model);
2749
2788
  } finally {
2750
- (serializedSize = parentSerializedSize), (debugID = prevDebugID);
2789
+ (serializedSize = parentSerializedSize),
2790
+ (canEmitDebugInfo = prevCanEmitDebugInfo);
2751
2791
  }
2752
2792
  }
2753
2793
  function performWork(request) {
@@ -4125,7 +4165,7 @@
4125
4165
  PRERENDER = 21,
4126
4166
  defaultPostponeHandler = noop,
4127
4167
  currentRequest = null,
4128
- debugID = null,
4168
+ canEmitDebugInfo = !1,
4129
4169
  serializedSize = 0,
4130
4170
  MAX_ROW_SIZE = 3200,
4131
4171
  modelRoot = !1,