react-server-dom-webpack 19.0.0-rc-19bd26be-20240815 → 19.0.0-rc-fa6eab58-20240815

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.
@@ -210,12 +210,13 @@
210
210
  maybeIterable["@@iterator"];
211
211
  return "function" === typeof maybeIterable ? maybeIterable : null;
212
212
  }
213
- function noop() {}
213
+ function noop$1() {}
214
214
  function trackUsedThenable(thenableState, thenable, index) {
215
215
  index = thenableState[index];
216
216
  void 0 === index
217
217
  ? thenableState.push(thenable)
218
- : index !== thenable && (thenable.then(noop, noop), (thenable = index));
218
+ : index !== thenable &&
219
+ (thenable.then(noop$1, noop$1), (thenable = index));
219
220
  switch (thenable.status) {
220
221
  case "fulfilled":
221
222
  return thenable.value;
@@ -223,7 +224,7 @@
223
224
  throw thenable.reason;
224
225
  default:
225
226
  "string" === typeof thenable.status
226
- ? thenable.then(noop, noop)
227
+ ? thenable.then(noop$1, noop$1)
227
228
  : ((thenableState = thenable),
228
229
  (thenableState.status = "pending"),
229
230
  thenableState.then(
@@ -498,7 +499,9 @@
498
499
  onPostpone,
499
500
  temporaryReferences,
500
501
  environmentName,
501
- filterStackFrame
502
+ filterStackFrame,
503
+ onAllReady,
504
+ onFatalError
502
505
  ) {
503
506
  if (
504
507
  null !== ReactSharedInternalsServer.A &&
@@ -537,6 +540,8 @@
537
540
  this.onError = void 0 === onError ? defaultErrorHandler : onError;
538
541
  this.onPostpone =
539
542
  void 0 === onPostpone ? defaultPostponeHandler : onPostpone;
543
+ this.onAllReady = void 0 === onAllReady ? noop : onAllReady;
544
+ this.onFatalError = void 0 === onFatalError ? noop : onFatalError;
540
545
  this.environmentName =
541
546
  void 0 === environmentName
542
547
  ? function () {
@@ -555,6 +560,7 @@
555
560
  model = createTask(this, model, null, !1, abortSet, null);
556
561
  pingedTasks.push(model);
557
562
  }
563
+ function noop() {}
558
564
  function serializeThenable(request, task, thenable) {
559
565
  var newTask = createTask(
560
566
  request,
@@ -1640,6 +1646,8 @@
1640
1646
  return errorDigest || "";
1641
1647
  }
1642
1648
  function fatalError(request, error) {
1649
+ var onFatalError = request.onFatalError;
1650
+ onFatalError(error);
1643
1651
  null !== request.destination
1644
1652
  ? ((request.status = CLOSED),
1645
1653
  closeWithError(request.destination, error))
@@ -2072,6 +2080,10 @@
2072
2080
  retryTask(request, pingedTasks[i]);
2073
2081
  null !== request.destination &&
2074
2082
  flushCompletedChunks(request, request.destination);
2083
+ if (0 === request.abortableTasks.size) {
2084
+ var onAllReady = request.onAllReady;
2085
+ onAllReady();
2086
+ }
2075
2087
  } catch (error) {
2076
2088
  logRecoverableError(request, error, null), fatalError(request, error);
2077
2089
  } finally {
@@ -3490,7 +3502,9 @@
3490
3502
  options ? options.onPostpone : void 0,
3491
3503
  options ? options.temporaryReferences : void 0,
3492
3504
  options ? options.environmentName : void 0,
3493
- options ? options.filterStackFrame : void 0
3505
+ options ? options.filterStackFrame : void 0,
3506
+ void 0,
3507
+ void 0
3494
3508
  );
3495
3509
  if (options && options.signal) {
3496
3510
  var signal = options.signal;
@@ -443,12 +443,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator,
443
443
  SuspenseException = Error(
444
444
  "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"
445
445
  );
446
- function noop() {}
446
+ function noop$1() {}
447
447
  function trackUsedThenable(thenableState, thenable, index) {
448
448
  index = thenableState[index];
449
449
  void 0 === index
450
450
  ? thenableState.push(thenable)
451
- : index !== thenable && (thenable.then(noop, noop), (thenable = index));
451
+ : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index));
452
452
  switch (thenable.status) {
453
453
  case "fulfilled":
454
454
  return thenable.value;
@@ -456,7 +456,7 @@ function trackUsedThenable(thenableState, thenable, index) {
456
456
  throw thenable.reason;
457
457
  default:
458
458
  "string" === typeof thenable.status
459
- ? thenable.then(noop, noop)
459
+ ? thenable.then(noop$1, noop$1)
460
460
  : ((thenableState = thenable),
461
461
  (thenableState.status = "pending"),
462
462
  thenableState.then(
@@ -712,7 +712,11 @@ function RequestInstance(
712
712
  onError,
713
713
  identifierPrefix,
714
714
  onPostpone,
715
- temporaryReferences
715
+ temporaryReferences,
716
+ environmentName,
717
+ filterStackFrame,
718
+ onAllReady,
719
+ onFatalError
716
720
  ) {
717
721
  if (
718
722
  null !== ReactSharedInternalsServer.A &&
@@ -720,9 +724,9 @@ function RequestInstance(
720
724
  )
721
725
  throw Error("Currently React only supports one RSC renderer at a time.");
722
726
  ReactSharedInternalsServer.A = DefaultAsyncDispatcher;
723
- var abortSet = new Set(),
724
- pingedTasks = [],
725
- hints = new Set();
727
+ filterStackFrame = new Set();
728
+ environmentName = [];
729
+ var hints = new Set();
726
730
  this.status = 0;
727
731
  this.flushScheduled = !1;
728
732
  this.destination = this.fatalError = null;
@@ -731,8 +735,8 @@ function RequestInstance(
731
735
  this.pendingChunks = this.nextChunkId = 0;
732
736
  this.hints = hints;
733
737
  this.abortListeners = new Set();
734
- this.abortableTasks = abortSet;
735
- this.pingedTasks = pingedTasks;
738
+ this.abortableTasks = filterStackFrame;
739
+ this.pingedTasks = environmentName;
736
740
  this.completedImportChunks = [];
737
741
  this.completedHintChunks = [];
738
742
  this.completedRegularChunks = [];
@@ -747,9 +751,12 @@ function RequestInstance(
747
751
  this.taintCleanupQueue = [];
748
752
  this.onError = void 0 === onError ? defaultErrorHandler : onError;
749
753
  this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone;
750
- model = createTask(this, model, null, !1, abortSet);
751
- pingedTasks.push(model);
754
+ this.onAllReady = void 0 === onAllReady ? noop : onAllReady;
755
+ this.onFatalError = void 0 === onFatalError ? noop : onFatalError;
756
+ model = createTask(this, model, null, !1, filterStackFrame);
757
+ environmentName.push(model);
752
758
  }
759
+ function noop() {}
753
760
  var currentRequest = null;
754
761
  function serializeThenable(request, task, thenable) {
755
762
  var newTask = createTask(
@@ -1602,6 +1609,8 @@ function logRecoverableError(request, error) {
1602
1609
  return errorDigest || "";
1603
1610
  }
1604
1611
  function fatalError(request, error) {
1612
+ var onFatalError = request.onFatalError;
1613
+ onFatalError(error);
1605
1614
  null !== request.destination
1606
1615
  ? ((request.status = 3), closeWithError(request.destination, error))
1607
1616
  : ((request.status = 2), (request.fatalError = error));
@@ -1744,6 +1753,10 @@ function performWork(request) {
1744
1753
  retryTask(request, pingedTasks[i]);
1745
1754
  null !== request.destination &&
1746
1755
  flushCompletedChunks(request, request.destination);
1756
+ if (0 === request.abortableTasks.size) {
1757
+ var onAllReady = request.onAllReady;
1758
+ onAllReady();
1759
+ }
1747
1760
  } catch (error) {
1748
1761
  logRecoverableError(request, error, null), fatalError(request, error);
1749
1762
  } finally {
@@ -2664,7 +2677,11 @@ exports.renderToReadableStream = function (model, webpackMap, options) {
2664
2677
  options ? options.onError : void 0,
2665
2678
  options ? options.identifierPrefix : void 0,
2666
2679
  options ? options.onPostpone : void 0,
2667
- options ? options.temporaryReferences : void 0
2680
+ options ? options.temporaryReferences : void 0,
2681
+ void 0,
2682
+ void 0,
2683
+ void 0,
2684
+ void 0
2668
2685
  );
2669
2686
  if (options && options.signal) {
2670
2687
  var signal = options.signal;
@@ -206,12 +206,13 @@
206
206
  maybeIterable["@@iterator"];
207
207
  return "function" === typeof maybeIterable ? maybeIterable : null;
208
208
  }
209
- function noop() {}
209
+ function noop$1() {}
210
210
  function trackUsedThenable(thenableState, thenable, index) {
211
211
  index = thenableState[index];
212
212
  void 0 === index
213
213
  ? thenableState.push(thenable)
214
- : index !== thenable && (thenable.then(noop, noop), (thenable = index));
214
+ : index !== thenable &&
215
+ (thenable.then(noop$1, noop$1), (thenable = index));
215
216
  switch (thenable.status) {
216
217
  case "fulfilled":
217
218
  return thenable.value;
@@ -219,7 +220,7 @@
219
220
  throw thenable.reason;
220
221
  default:
221
222
  "string" === typeof thenable.status
222
- ? thenable.then(noop, noop)
223
+ ? thenable.then(noop$1, noop$1)
223
224
  : ((thenableState = thenable),
224
225
  (thenableState.status = "pending"),
225
226
  thenableState.then(
@@ -494,7 +495,9 @@
494
495
  onPostpone,
495
496
  temporaryReferences,
496
497
  environmentName,
497
- filterStackFrame
498
+ filterStackFrame,
499
+ onAllReady,
500
+ onFatalError
498
501
  ) {
499
502
  if (
500
503
  null !== ReactSharedInternalsServer.A &&
@@ -533,6 +536,8 @@
533
536
  this.onError = void 0 === onError ? defaultErrorHandler : onError;
534
537
  this.onPostpone =
535
538
  void 0 === onPostpone ? defaultPostponeHandler : onPostpone;
539
+ this.onAllReady = void 0 === onAllReady ? noop : onAllReady;
540
+ this.onFatalError = void 0 === onFatalError ? noop : onFatalError;
536
541
  this.environmentName =
537
542
  void 0 === environmentName
538
543
  ? function () {
@@ -551,6 +556,7 @@
551
556
  model = createTask(this, model, null, !1, abortSet, null);
552
557
  pingedTasks.push(model);
553
558
  }
559
+ function noop() {}
554
560
  function resolveRequest() {
555
561
  if (currentRequest) return currentRequest;
556
562
  if (supportsRequestStorage) {
@@ -1663,6 +1669,8 @@
1663
1669
  return errorDigest || "";
1664
1670
  }
1665
1671
  function fatalError(request, error) {
1672
+ var onFatalError = request.onFatalError;
1673
+ onFatalError(error);
1666
1674
  null !== request.destination
1667
1675
  ? ((request.status = CLOSED),
1668
1676
  closeWithError(request.destination, error))
@@ -2095,6 +2103,10 @@
2095
2103
  retryTask(request, pingedTasks[i]);
2096
2104
  null !== request.destination &&
2097
2105
  flushCompletedChunks(request, request.destination);
2106
+ if (0 === request.abortableTasks.size) {
2107
+ var onAllReady = request.onAllReady;
2108
+ onAllReady();
2109
+ }
2098
2110
  } catch (error) {
2099
2111
  logRecoverableError(request, error, null), fatalError(request, error);
2100
2112
  } finally {
@@ -3514,7 +3526,9 @@
3514
3526
  options ? options.onPostpone : void 0,
3515
3527
  options ? options.temporaryReferences : void 0,
3516
3528
  options ? options.environmentName : void 0,
3517
- options ? options.filterStackFrame : void 0
3529
+ options ? options.filterStackFrame : void 0,
3530
+ void 0,
3531
+ void 0
3518
3532
  );
3519
3533
  if (options && options.signal) {
3520
3534
  var signal = options.signal;
@@ -441,12 +441,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator,
441
441
  SuspenseException = Error(
442
442
  "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"
443
443
  );
444
- function noop() {}
444
+ function noop$1() {}
445
445
  function trackUsedThenable(thenableState, thenable, index) {
446
446
  index = thenableState[index];
447
447
  void 0 === index
448
448
  ? thenableState.push(thenable)
449
- : index !== thenable && (thenable.then(noop, noop), (thenable = index));
449
+ : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index));
450
450
  switch (thenable.status) {
451
451
  case "fulfilled":
452
452
  return thenable.value;
@@ -454,7 +454,7 @@ function trackUsedThenable(thenableState, thenable, index) {
454
454
  throw thenable.reason;
455
455
  default:
456
456
  "string" === typeof thenable.status
457
- ? thenable.then(noop, noop)
457
+ ? thenable.then(noop$1, noop$1)
458
458
  : ((thenableState = thenable),
459
459
  (thenableState.status = "pending"),
460
460
  thenableState.then(
@@ -709,7 +709,11 @@ function RequestInstance(
709
709
  onError,
710
710
  identifierPrefix,
711
711
  onPostpone,
712
- temporaryReferences
712
+ temporaryReferences,
713
+ environmentName,
714
+ filterStackFrame,
715
+ onAllReady,
716
+ onFatalError
713
717
  ) {
714
718
  if (
715
719
  null !== ReactSharedInternalsServer.A &&
@@ -717,9 +721,9 @@ function RequestInstance(
717
721
  )
718
722
  throw Error("Currently React only supports one RSC renderer at a time.");
719
723
  ReactSharedInternalsServer.A = DefaultAsyncDispatcher;
720
- var abortSet = new Set(),
721
- pingedTasks = [],
722
- hints = new Set();
724
+ filterStackFrame = new Set();
725
+ environmentName = [];
726
+ var hints = new Set();
723
727
  this.status = 0;
724
728
  this.flushScheduled = !1;
725
729
  this.destination = this.fatalError = null;
@@ -728,8 +732,8 @@ function RequestInstance(
728
732
  this.pendingChunks = this.nextChunkId = 0;
729
733
  this.hints = hints;
730
734
  this.abortListeners = new Set();
731
- this.abortableTasks = abortSet;
732
- this.pingedTasks = pingedTasks;
735
+ this.abortableTasks = filterStackFrame;
736
+ this.pingedTasks = environmentName;
733
737
  this.completedImportChunks = [];
734
738
  this.completedHintChunks = [];
735
739
  this.completedRegularChunks = [];
@@ -744,9 +748,12 @@ function RequestInstance(
744
748
  this.taintCleanupQueue = [];
745
749
  this.onError = void 0 === onError ? defaultErrorHandler : onError;
746
750
  this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone;
747
- model = createTask(this, model, null, !1, abortSet);
748
- pingedTasks.push(model);
751
+ this.onAllReady = void 0 === onAllReady ? noop : onAllReady;
752
+ this.onFatalError = void 0 === onFatalError ? noop : onFatalError;
753
+ model = createTask(this, model, null, !1, filterStackFrame);
754
+ environmentName.push(model);
749
755
  }
756
+ function noop() {}
750
757
  var currentRequest = null;
751
758
  function resolveRequest() {
752
759
  if (currentRequest) return currentRequest;
@@ -1609,6 +1616,8 @@ function logRecoverableError(request, error) {
1609
1616
  return errorDigest || "";
1610
1617
  }
1611
1618
  function fatalError(request, error) {
1619
+ var onFatalError = request.onFatalError;
1620
+ onFatalError(error);
1612
1621
  null !== request.destination
1613
1622
  ? ((request.status = 3), closeWithError(request.destination, error))
1614
1623
  : ((request.status = 2), (request.fatalError = error));
@@ -1751,6 +1760,10 @@ function performWork(request) {
1751
1760
  retryTask(request, pingedTasks[i]);
1752
1761
  null !== request.destination &&
1753
1762
  flushCompletedChunks(request, request.destination);
1763
+ if (0 === request.abortableTasks.size) {
1764
+ var onAllReady = request.onAllReady;
1765
+ onAllReady();
1766
+ }
1754
1767
  } catch (error) {
1755
1768
  logRecoverableError(request, error, null), fatalError(request, error);
1756
1769
  } finally {
@@ -2666,7 +2679,11 @@ exports.renderToReadableStream = function (model, webpackMap, options) {
2666
2679
  options ? options.onError : void 0,
2667
2680
  options ? options.identifierPrefix : void 0,
2668
2681
  options ? options.onPostpone : void 0,
2669
- options ? options.temporaryReferences : void 0
2682
+ options ? options.temporaryReferences : void 0,
2683
+ void 0,
2684
+ void 0,
2685
+ void 0,
2686
+ void 0
2670
2687
  );
2671
2688
  if (options && options.signal) {
2672
2689
  var signal = options.signal;
@@ -233,12 +233,13 @@
233
233
  maybeIterable["@@iterator"];
234
234
  return "function" === typeof maybeIterable ? maybeIterable : null;
235
235
  }
236
- function noop() {}
236
+ function noop$1() {}
237
237
  function trackUsedThenable(thenableState, thenable, index) {
238
238
  index = thenableState[index];
239
239
  void 0 === index
240
240
  ? thenableState.push(thenable)
241
- : index !== thenable && (thenable.then(noop, noop), (thenable = index));
241
+ : index !== thenable &&
242
+ (thenable.then(noop$1, noop$1), (thenable = index));
242
243
  switch (thenable.status) {
243
244
  case "fulfilled":
244
245
  return thenable.value;
@@ -246,7 +247,7 @@
246
247
  throw thenable.reason;
247
248
  default:
248
249
  "string" === typeof thenable.status
249
- ? thenable.then(noop, noop)
250
+ ? thenable.then(noop$1, noop$1)
250
251
  : ((thenableState = thenable),
251
252
  (thenableState.status = "pending"),
252
253
  thenableState.then(
@@ -521,7 +522,9 @@
521
522
  onPostpone,
522
523
  temporaryReferences,
523
524
  environmentName,
524
- filterStackFrame
525
+ filterStackFrame,
526
+ onAllReady,
527
+ onFatalError
525
528
  ) {
526
529
  if (
527
530
  null !== ReactSharedInternalsServer.A &&
@@ -560,6 +563,8 @@
560
563
  this.onError = void 0 === onError ? defaultErrorHandler : onError;
561
564
  this.onPostpone =
562
565
  void 0 === onPostpone ? defaultPostponeHandler : onPostpone;
566
+ this.onAllReady = void 0 === onAllReady ? noop : onAllReady;
567
+ this.onFatalError = void 0 === onFatalError ? noop : onFatalError;
563
568
  this.environmentName =
564
569
  void 0 === environmentName
565
570
  ? function () {
@@ -578,6 +583,7 @@
578
583
  model = createTask(this, model, null, !1, abortSet, null);
579
584
  pingedTasks.push(model);
580
585
  }
586
+ function noop() {}
581
587
  function resolveRequest() {
582
588
  if (currentRequest) return currentRequest;
583
589
  var store = requestStorage.getStore();
@@ -1678,6 +1684,8 @@
1678
1684
  return errorDigest || "";
1679
1685
  }
1680
1686
  function fatalError(request, error) {
1687
+ var onFatalError = request.onFatalError;
1688
+ onFatalError(error);
1681
1689
  null !== request.destination
1682
1690
  ? ((request.status = CLOSED), request.destination.destroy(error))
1683
1691
  : ((request.status = 2), (request.fatalError = error));
@@ -2101,6 +2109,10 @@
2101
2109
  retryTask(request, pingedTasks[i]);
2102
2110
  null !== request.destination &&
2103
2111
  flushCompletedChunks(request, request.destination);
2112
+ if (0 === request.abortableTasks.size) {
2113
+ var onAllReady = request.onAllReady;
2114
+ onAllReady();
2115
+ }
2104
2116
  } catch (error) {
2105
2117
  logRecoverableError(request, error, null), fatalError(request, error);
2106
2118
  } finally {
@@ -3585,7 +3597,9 @@
3585
3597
  options ? options.onPostpone : void 0,
3586
3598
  options ? options.temporaryReferences : void 0,
3587
3599
  options ? options.environmentName : void 0,
3588
- options ? options.filterStackFrame : void 0
3600
+ options ? options.filterStackFrame : void 0,
3601
+ void 0,
3602
+ void 0
3589
3603
  ),
3590
3604
  hasStartedFlowing = !1;
3591
3605
  startWork(request);
@@ -460,12 +460,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator,
460
460
  SuspenseException = Error(
461
461
  "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"
462
462
  );
463
- function noop() {}
463
+ function noop$1() {}
464
464
  function trackUsedThenable(thenableState, thenable, index) {
465
465
  index = thenableState[index];
466
466
  void 0 === index
467
467
  ? thenableState.push(thenable)
468
- : index !== thenable && (thenable.then(noop, noop), (thenable = index));
468
+ : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index));
469
469
  switch (thenable.status) {
470
470
  case "fulfilled":
471
471
  return thenable.value;
@@ -473,7 +473,7 @@ function trackUsedThenable(thenableState, thenable, index) {
473
473
  throw thenable.reason;
474
474
  default:
475
475
  "string" === typeof thenable.status
476
- ? thenable.then(noop, noop)
476
+ ? thenable.then(noop$1, noop$1)
477
477
  : ((thenableState = thenable),
478
478
  (thenableState.status = "pending"),
479
479
  thenableState.then(
@@ -728,7 +728,11 @@ function RequestInstance(
728
728
  onError,
729
729
  identifierPrefix,
730
730
  onPostpone,
731
- temporaryReferences
731
+ temporaryReferences,
732
+ environmentName,
733
+ filterStackFrame,
734
+ onAllReady,
735
+ onFatalError
732
736
  ) {
733
737
  if (
734
738
  null !== ReactSharedInternalsServer.A &&
@@ -736,9 +740,9 @@ function RequestInstance(
736
740
  )
737
741
  throw Error("Currently React only supports one RSC renderer at a time.");
738
742
  ReactSharedInternalsServer.A = DefaultAsyncDispatcher;
739
- var abortSet = new Set(),
740
- pingedTasks = [],
741
- hints = new Set();
743
+ filterStackFrame = new Set();
744
+ environmentName = [];
745
+ var hints = new Set();
742
746
  this.status = 0;
743
747
  this.flushScheduled = !1;
744
748
  this.destination = this.fatalError = null;
@@ -747,8 +751,8 @@ function RequestInstance(
747
751
  this.pendingChunks = this.nextChunkId = 0;
748
752
  this.hints = hints;
749
753
  this.abortListeners = new Set();
750
- this.abortableTasks = abortSet;
751
- this.pingedTasks = pingedTasks;
754
+ this.abortableTasks = filterStackFrame;
755
+ this.pingedTasks = environmentName;
752
756
  this.completedImportChunks = [];
753
757
  this.completedHintChunks = [];
754
758
  this.completedRegularChunks = [];
@@ -763,9 +767,12 @@ function RequestInstance(
763
767
  this.taintCleanupQueue = [];
764
768
  this.onError = void 0 === onError ? defaultErrorHandler : onError;
765
769
  this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone;
766
- model = createTask(this, model, null, !1, abortSet);
767
- pingedTasks.push(model);
770
+ this.onAllReady = void 0 === onAllReady ? noop : onAllReady;
771
+ this.onFatalError = void 0 === onFatalError ? noop : onFatalError;
772
+ model = createTask(this, model, null, !1, filterStackFrame);
773
+ environmentName.push(model);
768
774
  }
775
+ function noop() {}
769
776
  var currentRequest = null;
770
777
  function resolveRequest() {
771
778
  if (currentRequest) return currentRequest;
@@ -1619,6 +1626,8 @@ function logRecoverableError(request, error) {
1619
1626
  return errorDigest || "";
1620
1627
  }
1621
1628
  function fatalError(request, error) {
1629
+ var onFatalError = request.onFatalError;
1630
+ onFatalError(error);
1622
1631
  null !== request.destination
1623
1632
  ? ((request.status = 3), request.destination.destroy(error))
1624
1633
  : ((request.status = 2), (request.fatalError = error));
@@ -1755,6 +1764,10 @@ function performWork(request) {
1755
1764
  retryTask(request, pingedTasks[i]);
1756
1765
  null !== request.destination &&
1757
1766
  flushCompletedChunks(request, request.destination);
1767
+ if (0 === request.abortableTasks.size) {
1768
+ var onAllReady = request.onAllReady;
1769
+ onAllReady();
1770
+ }
1758
1771
  } catch (error) {
1759
1772
  logRecoverableError(request, error, null), fatalError(request, error);
1760
1773
  } finally {
@@ -2767,7 +2780,11 @@ exports.renderToPipeableStream = function (model, webpackMap, options) {
2767
2780
  options ? options.onError : void 0,
2768
2781
  options ? options.identifierPrefix : void 0,
2769
2782
  options ? options.onPostpone : void 0,
2770
- options ? options.temporaryReferences : void 0
2783
+ options ? options.temporaryReferences : void 0,
2784
+ void 0,
2785
+ void 0,
2786
+ void 0,
2787
+ void 0
2771
2788
  ),
2772
2789
  hasStartedFlowing = !1;
2773
2790
  startWork(request);
@@ -233,12 +233,13 @@
233
233
  maybeIterable["@@iterator"];
234
234
  return "function" === typeof maybeIterable ? maybeIterable : null;
235
235
  }
236
- function noop() {}
236
+ function noop$1() {}
237
237
  function trackUsedThenable(thenableState, thenable, index) {
238
238
  index = thenableState[index];
239
239
  void 0 === index
240
240
  ? thenableState.push(thenable)
241
- : index !== thenable && (thenable.then(noop, noop), (thenable = index));
241
+ : index !== thenable &&
242
+ (thenable.then(noop$1, noop$1), (thenable = index));
242
243
  switch (thenable.status) {
243
244
  case "fulfilled":
244
245
  return thenable.value;
@@ -246,7 +247,7 @@
246
247
  throw thenable.reason;
247
248
  default:
248
249
  "string" === typeof thenable.status
249
- ? thenable.then(noop, noop)
250
+ ? thenable.then(noop$1, noop$1)
250
251
  : ((thenableState = thenable),
251
252
  (thenableState.status = "pending"),
252
253
  thenableState.then(
@@ -521,7 +522,9 @@
521
522
  onPostpone,
522
523
  temporaryReferences,
523
524
  environmentName,
524
- filterStackFrame
525
+ filterStackFrame,
526
+ onAllReady,
527
+ onFatalError
525
528
  ) {
526
529
  if (
527
530
  null !== ReactSharedInternalsServer.A &&
@@ -560,6 +563,8 @@
560
563
  this.onError = void 0 === onError ? defaultErrorHandler : onError;
561
564
  this.onPostpone =
562
565
  void 0 === onPostpone ? defaultPostponeHandler : onPostpone;
566
+ this.onAllReady = void 0 === onAllReady ? noop : onAllReady;
567
+ this.onFatalError = void 0 === onFatalError ? noop : onFatalError;
563
568
  this.environmentName =
564
569
  void 0 === environmentName
565
570
  ? function () {
@@ -578,6 +583,7 @@
578
583
  model = createTask(this, model, null, !1, abortSet, null);
579
584
  pingedTasks.push(model);
580
585
  }
586
+ function noop() {}
581
587
  function resolveRequest() {
582
588
  if (currentRequest) return currentRequest;
583
589
  var store = requestStorage.getStore();
@@ -1678,6 +1684,8 @@
1678
1684
  return errorDigest || "";
1679
1685
  }
1680
1686
  function fatalError(request, error) {
1687
+ var onFatalError = request.onFatalError;
1688
+ onFatalError(error);
1681
1689
  null !== request.destination
1682
1690
  ? ((request.status = CLOSED), request.destination.destroy(error))
1683
1691
  : ((request.status = 2), (request.fatalError = error));
@@ -2101,6 +2109,10 @@
2101
2109
  retryTask(request, pingedTasks[i]);
2102
2110
  null !== request.destination &&
2103
2111
  flushCompletedChunks(request, request.destination);
2112
+ if (0 === request.abortableTasks.size) {
2113
+ var onAllReady = request.onAllReady;
2114
+ onAllReady();
2115
+ }
2104
2116
  } catch (error) {
2105
2117
  logRecoverableError(request, error, null), fatalError(request, error);
2106
2118
  } finally {
@@ -3550,7 +3562,9 @@
3550
3562
  options ? options.onPostpone : void 0,
3551
3563
  options ? options.temporaryReferences : void 0,
3552
3564
  options ? options.environmentName : void 0,
3553
- options ? options.filterStackFrame : void 0
3565
+ options ? options.filterStackFrame : void 0,
3566
+ void 0,
3567
+ void 0
3554
3568
  ),
3555
3569
  hasStartedFlowing = !1;
3556
3570
  startWork(request);
@@ -460,12 +460,12 @@ var ASYNC_ITERATOR = Symbol.asyncIterator,
460
460
  SuspenseException = Error(
461
461
  "Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`"
462
462
  );
463
- function noop() {}
463
+ function noop$1() {}
464
464
  function trackUsedThenable(thenableState, thenable, index) {
465
465
  index = thenableState[index];
466
466
  void 0 === index
467
467
  ? thenableState.push(thenable)
468
- : index !== thenable && (thenable.then(noop, noop), (thenable = index));
468
+ : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index));
469
469
  switch (thenable.status) {
470
470
  case "fulfilled":
471
471
  return thenable.value;
@@ -473,7 +473,7 @@ function trackUsedThenable(thenableState, thenable, index) {
473
473
  throw thenable.reason;
474
474
  default:
475
475
  "string" === typeof thenable.status
476
- ? thenable.then(noop, noop)
476
+ ? thenable.then(noop$1, noop$1)
477
477
  : ((thenableState = thenable),
478
478
  (thenableState.status = "pending"),
479
479
  thenableState.then(
@@ -728,7 +728,11 @@ function RequestInstance(
728
728
  onError,
729
729
  identifierPrefix,
730
730
  onPostpone,
731
- temporaryReferences
731
+ temporaryReferences,
732
+ environmentName,
733
+ filterStackFrame,
734
+ onAllReady,
735
+ onFatalError
732
736
  ) {
733
737
  if (
734
738
  null !== ReactSharedInternalsServer.A &&
@@ -736,9 +740,9 @@ function RequestInstance(
736
740
  )
737
741
  throw Error("Currently React only supports one RSC renderer at a time.");
738
742
  ReactSharedInternalsServer.A = DefaultAsyncDispatcher;
739
- var abortSet = new Set(),
740
- pingedTasks = [],
741
- hints = new Set();
743
+ filterStackFrame = new Set();
744
+ environmentName = [];
745
+ var hints = new Set();
742
746
  this.status = 0;
743
747
  this.flushScheduled = !1;
744
748
  this.destination = this.fatalError = null;
@@ -747,8 +751,8 @@ function RequestInstance(
747
751
  this.pendingChunks = this.nextChunkId = 0;
748
752
  this.hints = hints;
749
753
  this.abortListeners = new Set();
750
- this.abortableTasks = abortSet;
751
- this.pingedTasks = pingedTasks;
754
+ this.abortableTasks = filterStackFrame;
755
+ this.pingedTasks = environmentName;
752
756
  this.completedImportChunks = [];
753
757
  this.completedHintChunks = [];
754
758
  this.completedRegularChunks = [];
@@ -763,9 +767,12 @@ function RequestInstance(
763
767
  this.taintCleanupQueue = [];
764
768
  this.onError = void 0 === onError ? defaultErrorHandler : onError;
765
769
  this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone;
766
- model = createTask(this, model, null, !1, abortSet);
767
- pingedTasks.push(model);
770
+ this.onAllReady = void 0 === onAllReady ? noop : onAllReady;
771
+ this.onFatalError = void 0 === onFatalError ? noop : onFatalError;
772
+ model = createTask(this, model, null, !1, filterStackFrame);
773
+ environmentName.push(model);
768
774
  }
775
+ function noop() {}
769
776
  var currentRequest = null;
770
777
  function resolveRequest() {
771
778
  if (currentRequest) return currentRequest;
@@ -1619,6 +1626,8 @@ function logRecoverableError(request, error) {
1619
1626
  return errorDigest || "";
1620
1627
  }
1621
1628
  function fatalError(request, error) {
1629
+ var onFatalError = request.onFatalError;
1630
+ onFatalError(error);
1622
1631
  null !== request.destination
1623
1632
  ? ((request.status = 3), request.destination.destroy(error))
1624
1633
  : ((request.status = 2), (request.fatalError = error));
@@ -1755,6 +1764,10 @@ function performWork(request) {
1755
1764
  retryTask(request, pingedTasks[i]);
1756
1765
  null !== request.destination &&
1757
1766
  flushCompletedChunks(request, request.destination);
1767
+ if (0 === request.abortableTasks.size) {
1768
+ var onAllReady = request.onAllReady;
1769
+ onAllReady();
1770
+ }
1758
1771
  } catch (error) {
1759
1772
  logRecoverableError(request, error, null), fatalError(request, error);
1760
1773
  } finally {
@@ -2735,7 +2748,11 @@ exports.renderToPipeableStream = function (model, webpackMap, options) {
2735
2748
  options ? options.onError : void 0,
2736
2749
  options ? options.identifierPrefix : void 0,
2737
2750
  options ? options.onPostpone : void 0,
2738
- options ? options.temporaryReferences : void 0
2751
+ options ? options.temporaryReferences : void 0,
2752
+ void 0,
2753
+ void 0,
2754
+ void 0,
2755
+ void 0
2739
2756
  ),
2740
2757
  hasStartedFlowing = !1;
2741
2758
  startWork(request);
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-rc-19bd26be-20240815",
4
+ "version": "19.0.0-rc-fa6eab58-20240815",
5
5
  "keywords": [
6
6
  "react"
7
7
  ],
@@ -23,6 +23,11 @@
23
23
  "server.edge.js",
24
24
  "server.node.js",
25
25
  "server.node.unbundled.js",
26
+ "static.js",
27
+ "static.browser.js",
28
+ "static.edge.js",
29
+ "static.node.js",
30
+ "static.node.unbundled.js",
26
31
  "node-register.js",
27
32
  "cjs/",
28
33
  "esm/"
@@ -63,6 +68,23 @@
63
68
  "./server.edge": "./server.edge.js",
64
69
  "./server.node": "./server.node.js",
65
70
  "./server.node.unbundled": "./server.node.unbundled.js",
71
+ "./static": {
72
+ "react-server": {
73
+ "workerd": "./static.edge.js",
74
+ "deno": "./static.browser.js",
75
+ "node": {
76
+ "webpack": "./static.node.js",
77
+ "default": "./static.node.unbundled.js"
78
+ },
79
+ "edge-light": "./static.edge.js",
80
+ "browser": "./static.browser.js"
81
+ },
82
+ "default": "./static.js"
83
+ },
84
+ "./static.browser": "./static.browser.js",
85
+ "./static.edge": "./static.edge.js",
86
+ "./static.node": "./static.node.js",
87
+ "./static.node.unbundled": "./static.node.unbundled.js",
66
88
  "./node-loader": "./esm/react-server-dom-webpack-node-loader.production.js",
67
89
  "./node-register": "./node-register.js",
68
90
  "./package.json": "./package.json"
@@ -77,8 +99,8 @@
77
99
  "node": ">=0.10.0"
78
100
  },
79
101
  "peerDependencies": {
80
- "react": "19.0.0-rc-19bd26be-20240815",
81
- "react-dom": "19.0.0-rc-19bd26be-20240815",
102
+ "react": "19.0.0-rc-fa6eab58-20240815",
103
+ "react-dom": "19.0.0-rc-fa6eab58-20240815",
82
104
  "webpack": "^5.59.0"
83
105
  },
84
106
  "dependencies": {
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var s;
4
+ if (process.env.NODE_ENV === 'production') {
5
+ s = require('./cjs/react-server-dom-webpack-server.browser.production.js');
6
+ } else {
7
+ s = require('./cjs/react-server-dom-webpack-server.browser.development.js');
8
+ }
9
+
10
+ if (s.prerender) {
11
+ exports.prerender = s.prerender;
12
+ }
package/static.edge.js ADDED
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var s;
4
+ if (process.env.NODE_ENV === 'production') {
5
+ s = require('./cjs/react-server-dom-webpack-server.edge.production.js');
6
+ } else {
7
+ s = require('./cjs/react-server-dom-webpack-server.edge.development.js');
8
+ }
9
+
10
+ if (s.prerender) {
11
+ exports.prerender = s.prerender;
12
+ }
package/static.js ADDED
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ throw new Error(
4
+ 'The React Server Writer cannot be used outside a react-server environment. ' +
5
+ 'You must configure Node.js using the `--conditions react-server` flag.'
6
+ );
package/static.node.js ADDED
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var s;
4
+ if (process.env.NODE_ENV === 'production') {
5
+ s = require('./cjs/react-server-dom-webpack-server.node.production.js');
6
+ } else {
7
+ s = require('./cjs/react-server-dom-webpack-server.node.development.js');
8
+ }
9
+
10
+ if (s.prerenderToNodeStream) {
11
+ exports.prerenderToNodeStream = s.prerenderToNodeStream;
12
+ }
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var s;
4
+ if (process.env.NODE_ENV === 'production') {
5
+ s = require('./cjs/react-server-dom-webpack-server.node.unbundled.production.js');
6
+ } else {
7
+ s = require('./cjs/react-server-dom-webpack-server.node.unbundled.development.js');
8
+ }
9
+
10
+ if (s.prerenderToNodeStream) {
11
+ exports.prerenderToNodeStream = s.prerenderToNodeStream;
12
+ }