vue 3.5.10 → 3.5.11

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.
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.5.10
2
+ * vue v3.5.11
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.5.10
2
+ * vue v3.5.11
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.5.10
2
+ * vue v3.5.11
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -630,8 +630,14 @@ class ReactiveEffect {
630
630
  }
631
631
  let batchDepth = 0;
632
632
  let batchedSub;
633
- function batch(sub) {
633
+ let batchedComputed;
634
+ function batch(sub, isComputed = false) {
634
635
  sub.flags |= 8;
636
+ if (isComputed) {
637
+ sub.next = batchedComputed;
638
+ batchedComputed = sub;
639
+ return;
640
+ }
635
641
  sub.next = batchedSub;
636
642
  batchedSub = sub;
637
643
  }
@@ -642,20 +648,22 @@ function endBatch() {
642
648
  if (--batchDepth > 0) {
643
649
  return;
644
650
  }
651
+ if (batchedComputed) {
652
+ let e = batchedComputed;
653
+ batchedComputed = void 0;
654
+ while (e) {
655
+ const next = e.next;
656
+ e.next = void 0;
657
+ e.flags &= ~8;
658
+ e = next;
659
+ }
660
+ }
645
661
  let error;
646
662
  while (batchedSub) {
647
663
  let e = batchedSub;
648
- let next;
649
- while (e) {
650
- if (!(e.flags & 1)) {
651
- e.flags &= ~8;
652
- }
653
- e = e.next;
654
- }
655
- e = batchedSub;
656
664
  batchedSub = void 0;
657
665
  while (e) {
658
- next = e.next;
666
+ const next = e.next;
659
667
  e.next = void 0;
660
668
  e.flags &= ~8;
661
669
  if (e.flags & 1) {
@@ -851,7 +859,6 @@ class Dep {
851
859
  /**
852
860
  * For object property deps cleanup
853
861
  */
854
- this.target = void 0;
855
862
  this.map = void 0;
856
863
  this.key = void 0;
857
864
  /**
@@ -979,7 +986,6 @@ function track(target, type, key) {
979
986
  let dep = depsMap.get(key);
980
987
  if (!dep) {
981
988
  depsMap.set(key, dep = new Dep());
982
- dep.target = target;
983
989
  dep.map = depsMap;
984
990
  dep.key = key;
985
991
  }
@@ -2015,7 +2021,7 @@ class ComputedRefImpl {
2015
2021
  this.flags |= 16;
2016
2022
  if (!(this.flags & 8) && // avoid infinite self recursion
2017
2023
  activeSub !== this) {
2018
- batch(this);
2024
+ batch(this, true);
2019
2025
  return true;
2020
2026
  }
2021
2027
  }
@@ -2537,10 +2543,8 @@ function logError(err, type, contextVNode, throwInDev = true, throwInProd = fals
2537
2543
  }
2538
2544
  }
2539
2545
 
2540
- let isFlushing = false;
2541
- let isFlushPending = false;
2542
2546
  const queue = [];
2543
- let flushIndex = 0;
2547
+ let flushIndex = -1;
2544
2548
  const pendingPostFlushCbs = [];
2545
2549
  let activePostFlushCbs = null;
2546
2550
  let postFlushIndex = 0;
@@ -2552,7 +2556,7 @@ function nextTick(fn) {
2552
2556
  return fn ? p.then(this ? fn.bind(this) : fn) : p;
2553
2557
  }
2554
2558
  function findInsertionIndex(id) {
2555
- let start = isFlushing ? flushIndex + 1 : 0;
2559
+ let start = flushIndex + 1;
2556
2560
  let end = queue.length;
2557
2561
  while (start < end) {
2558
2562
  const middle = start + end >>> 1;
@@ -2581,8 +2585,7 @@ function queueJob(job) {
2581
2585
  }
2582
2586
  }
2583
2587
  function queueFlush() {
2584
- if (!isFlushing && !isFlushPending) {
2585
- isFlushPending = true;
2588
+ if (!currentFlushPromise) {
2586
2589
  currentFlushPromise = resolvedPromise.then(flushJobs);
2587
2590
  }
2588
2591
  }
@@ -2599,7 +2602,7 @@ function queuePostFlushCb(cb) {
2599
2602
  }
2600
2603
  queueFlush();
2601
2604
  }
2602
- function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
2605
+ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2603
2606
  {
2604
2607
  seen = seen || /* @__PURE__ */ new Map();
2605
2608
  }
@@ -2655,8 +2658,6 @@ function flushPostFlushCbs(seen) {
2655
2658
  }
2656
2659
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2657
2660
  function flushJobs(seen) {
2658
- isFlushPending = false;
2659
- isFlushing = true;
2660
2661
  {
2661
2662
  seen = seen || /* @__PURE__ */ new Map();
2662
2663
  }
@@ -2688,10 +2689,9 @@ function flushJobs(seen) {
2688
2689
  job.flags &= ~1;
2689
2690
  }
2690
2691
  }
2691
- flushIndex = 0;
2692
+ flushIndex = -1;
2692
2693
  queue.length = 0;
2693
2694
  flushPostFlushCbs(seen);
2694
- isFlushing = false;
2695
2695
  currentFlushPromise = null;
2696
2696
  if (queue.length || pendingPostFlushCbs.length) {
2697
2697
  flushJobs(seen);
@@ -10525,7 +10525,7 @@ function isMemoSame(cached, memo) {
10525
10525
  return true;
10526
10526
  }
10527
10527
 
10528
- const version = "3.5.10";
10528
+ const version = "3.5.11";
10529
10529
  const warn = warn$1 ;
10530
10530
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10531
10531
  const devtools = devtools$1 ;