vue 3.5.5 → 3.5.6

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.5.5
2
+ * vue v3.5.6
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -468,7 +468,7 @@ var Vue = (function (exports) {
468
468
  /**
469
469
  * @internal
470
470
  */
471
- this.nextEffect = void 0;
471
+ this.next = void 0;
472
472
  /**
473
473
  * @internal
474
474
  */
@@ -498,9 +498,7 @@ var Vue = (function (exports) {
498
498
  return;
499
499
  }
500
500
  if (!(this.flags & 8)) {
501
- this.flags |= 8;
502
- this.nextEffect = batchedEffect;
503
- batchedEffect = this;
501
+ batch(this);
504
502
  }
505
503
  }
506
504
  run() {
@@ -561,7 +559,12 @@ var Vue = (function (exports) {
561
559
  }
562
560
  }
563
561
  let batchDepth = 0;
564
- let batchedEffect;
562
+ let batchedSub;
563
+ function batch(sub) {
564
+ sub.flags |= 8;
565
+ sub.next = batchedSub;
566
+ batchedSub = sub;
567
+ }
565
568
  function startBatch() {
566
569
  batchDepth++;
567
570
  }
@@ -570,15 +573,16 @@ var Vue = (function (exports) {
570
573
  return;
571
574
  }
572
575
  let error;
573
- while (batchedEffect) {
574
- let e = batchedEffect;
575
- batchedEffect = void 0;
576
+ while (batchedSub) {
577
+ let e = batchedSub;
578
+ batchedSub = void 0;
576
579
  while (e) {
577
- const next = e.nextEffect;
578
- e.nextEffect = void 0;
580
+ const next = e.next;
581
+ e.next = void 0;
579
582
  e.flags &= ~8;
580
583
  if (e.flags & 1) {
581
584
  try {
585
+ ;
582
586
  e.trigger();
583
587
  } catch (err) {
584
588
  if (!error) error = err;
@@ -618,7 +622,7 @@ var Vue = (function (exports) {
618
622
  }
619
623
  function isDirty(sub) {
620
624
  for (let link = sub.deps; link; link = link.nextDep) {
621
- if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed) || link.dep.version !== link.version) {
625
+ if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {
622
626
  return true;
623
627
  }
624
628
  }
@@ -638,7 +642,7 @@ var Vue = (function (exports) {
638
642
  computed.globalVersion = globalVersion;
639
643
  const dep = computed.dep;
640
644
  computed.flags |= 2;
641
- if (dep.version > 0 && !computed.isSSR && !isDirty(computed)) {
645
+ if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
642
646
  computed.flags &= ~2;
643
647
  return;
644
648
  }
@@ -833,7 +837,10 @@ var Vue = (function (exports) {
833
837
  }
834
838
  }
835
839
  for (let link = this.subs; link; link = link.prevSub) {
836
- link.sub.notify();
840
+ if (link.sub.notify()) {
841
+ ;
842
+ link.sub.dep.notify();
843
+ }
837
844
  }
838
845
  } finally {
839
846
  endBatch();
@@ -1902,8 +1909,10 @@ var Vue = (function (exports) {
1902
1909
  */
1903
1910
  notify() {
1904
1911
  this.flags |= 16;
1905
- if (activeSub !== this) {
1906
- this.dep.notify();
1912
+ if (!(this.flags & 8) && // avoid infinite self recursion
1913
+ activeSub !== this) {
1914
+ batch(this);
1915
+ return true;
1907
1916
  }
1908
1917
  }
1909
1918
  get value() {
@@ -2051,20 +2060,12 @@ var Vue = (function (exports) {
2051
2060
  remove(scope.effects, effect);
2052
2061
  }
2053
2062
  };
2054
- if (once) {
2055
- if (cb) {
2056
- const _cb = cb;
2057
- cb = (...args) => {
2058
- _cb(...args);
2059
- watchHandle();
2060
- };
2061
- } else {
2062
- const _getter = getter;
2063
- getter = () => {
2064
- _getter();
2065
- watchHandle();
2066
- };
2067
- }
2063
+ if (once && cb) {
2064
+ const _cb = cb;
2065
+ cb = (...args) => {
2066
+ _cb(...args);
2067
+ watchHandle();
2068
+ };
2068
2069
  }
2069
2070
  let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
2070
2071
  const job = (immediateFirstRun) => {
@@ -10353,7 +10354,7 @@ Component that was made reactive: `,
10353
10354
  return true;
10354
10355
  }
10355
10356
 
10356
- const version = "3.5.5";
10357
+ const version = "3.5.6";
10357
10358
  const warn = warn$1 ;
10358
10359
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10359
10360
  const devtools = devtools$1 ;