@vue/compat 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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.10
2
+ * @vue/compat 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
  }
@@ -2025,7 +2031,7 @@ class ComputedRefImpl {
2025
2031
  this.flags |= 16;
2026
2032
  if (!(this.flags & 8) && // avoid infinite self recursion
2027
2033
  activeSub !== this) {
2028
- batch(this);
2034
+ batch(this, true);
2029
2035
  return true;
2030
2036
  } else if (!!(process.env.NODE_ENV !== "production")) ;
2031
2037
  }
@@ -2552,10 +2558,8 @@ function logError(err, type, contextVNode, throwInDev = true, throwInProd = fals
2552
2558
  }
2553
2559
  }
2554
2560
 
2555
- let isFlushing = false;
2556
- let isFlushPending = false;
2557
2561
  const queue = [];
2558
- let flushIndex = 0;
2562
+ let flushIndex = -1;
2559
2563
  const pendingPostFlushCbs = [];
2560
2564
  let activePostFlushCbs = null;
2561
2565
  let postFlushIndex = 0;
@@ -2567,7 +2571,7 @@ function nextTick(fn) {
2567
2571
  return fn ? p.then(this ? fn.bind(this) : fn) : p;
2568
2572
  }
2569
2573
  function findInsertionIndex(id) {
2570
- let start = isFlushing ? flushIndex + 1 : 0;
2574
+ let start = flushIndex + 1;
2571
2575
  let end = queue.length;
2572
2576
  while (start < end) {
2573
2577
  const middle = start + end >>> 1;
@@ -2596,8 +2600,7 @@ function queueJob(job) {
2596
2600
  }
2597
2601
  }
2598
2602
  function queueFlush() {
2599
- if (!isFlushing && !isFlushPending) {
2600
- isFlushPending = true;
2603
+ if (!currentFlushPromise) {
2601
2604
  currentFlushPromise = resolvedPromise.then(flushJobs);
2602
2605
  }
2603
2606
  }
@@ -2614,7 +2617,7 @@ function queuePostFlushCb(cb) {
2614
2617
  }
2615
2618
  queueFlush();
2616
2619
  }
2617
- function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
2620
+ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2618
2621
  if (!!(process.env.NODE_ENV !== "production")) {
2619
2622
  seen = seen || /* @__PURE__ */ new Map();
2620
2623
  }
@@ -2670,8 +2673,6 @@ function flushPostFlushCbs(seen) {
2670
2673
  }
2671
2674
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2672
2675
  function flushJobs(seen) {
2673
- isFlushPending = false;
2674
- isFlushing = true;
2675
2676
  if (!!(process.env.NODE_ENV !== "production")) {
2676
2677
  seen = seen || /* @__PURE__ */ new Map();
2677
2678
  }
@@ -2703,10 +2704,9 @@ function flushJobs(seen) {
2703
2704
  job.flags &= ~1;
2704
2705
  }
2705
2706
  }
2706
- flushIndex = 0;
2707
+ flushIndex = -1;
2707
2708
  queue.length = 0;
2708
2709
  flushPostFlushCbs(seen);
2709
- isFlushing = false;
2710
2710
  currentFlushPromise = null;
2711
2711
  if (queue.length || pendingPostFlushCbs.length) {
2712
2712
  flushJobs(seen);
@@ -7204,7 +7204,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7204
7204
  return vm;
7205
7205
  }
7206
7206
  }
7207
- Vue.version = `2.6.14-compat:${"3.5.10"}`;
7207
+ Vue.version = `2.6.14-compat:${"3.5.11"}`;
7208
7208
  Vue.config = singletonApp.config;
7209
7209
  Vue.use = (plugin, ...options) => {
7210
7210
  if (plugin && isFunction(plugin.install)) {
@@ -12373,7 +12373,7 @@ function isMemoSame(cached, memo) {
12373
12373
  return true;
12374
12374
  }
12375
12375
 
12376
- const version = "3.5.10";
12376
+ const version = "3.5.11";
12377
12377
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
12378
12378
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12379
12379
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.10
2
+ * @vue/compat v3.5.11
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -633,8 +633,14 @@ var Vue = (function () {
633
633
  }
634
634
  let batchDepth = 0;
635
635
  let batchedSub;
636
- function batch(sub) {
636
+ let batchedComputed;
637
+ function batch(sub, isComputed = false) {
637
638
  sub.flags |= 8;
639
+ if (isComputed) {
640
+ sub.next = batchedComputed;
641
+ batchedComputed = sub;
642
+ return;
643
+ }
638
644
  sub.next = batchedSub;
639
645
  batchedSub = sub;
640
646
  }
@@ -645,20 +651,22 @@ var Vue = (function () {
645
651
  if (--batchDepth > 0) {
646
652
  return;
647
653
  }
654
+ if (batchedComputed) {
655
+ let e = batchedComputed;
656
+ batchedComputed = void 0;
657
+ while (e) {
658
+ const next = e.next;
659
+ e.next = void 0;
660
+ e.flags &= ~8;
661
+ e = next;
662
+ }
663
+ }
648
664
  let error;
649
665
  while (batchedSub) {
650
666
  let e = batchedSub;
651
- let next;
652
- while (e) {
653
- if (!(e.flags & 1)) {
654
- e.flags &= ~8;
655
- }
656
- e = e.next;
657
- }
658
- e = batchedSub;
659
667
  batchedSub = void 0;
660
668
  while (e) {
661
- next = e.next;
669
+ const next = e.next;
662
670
  e.next = void 0;
663
671
  e.flags &= ~8;
664
672
  if (e.flags & 1) {
@@ -854,7 +862,6 @@ var Vue = (function () {
854
862
  /**
855
863
  * For object property deps cleanup
856
864
  */
857
- this.target = void 0;
858
865
  this.map = void 0;
859
866
  this.key = void 0;
860
867
  /**
@@ -982,7 +989,6 @@ var Vue = (function () {
982
989
  let dep = depsMap.get(key);
983
990
  if (!dep) {
984
991
  depsMap.set(key, dep = new Dep());
985
- dep.target = target;
986
992
  dep.map = depsMap;
987
993
  dep.key = key;
988
994
  }
@@ -2018,7 +2024,7 @@ var Vue = (function () {
2018
2024
  this.flags |= 16;
2019
2025
  if (!(this.flags & 8) && // avoid infinite self recursion
2020
2026
  activeSub !== this) {
2021
- batch(this);
2027
+ batch(this, true);
2022
2028
  return true;
2023
2029
  }
2024
2030
  }
@@ -2540,10 +2546,8 @@ var Vue = (function () {
2540
2546
  }
2541
2547
  }
2542
2548
 
2543
- let isFlushing = false;
2544
- let isFlushPending = false;
2545
2549
  const queue = [];
2546
- let flushIndex = 0;
2550
+ let flushIndex = -1;
2547
2551
  const pendingPostFlushCbs = [];
2548
2552
  let activePostFlushCbs = null;
2549
2553
  let postFlushIndex = 0;
@@ -2555,7 +2559,7 @@ var Vue = (function () {
2555
2559
  return fn ? p.then(this ? fn.bind(this) : fn) : p;
2556
2560
  }
2557
2561
  function findInsertionIndex(id) {
2558
- let start = isFlushing ? flushIndex + 1 : 0;
2562
+ let start = flushIndex + 1;
2559
2563
  let end = queue.length;
2560
2564
  while (start < end) {
2561
2565
  const middle = start + end >>> 1;
@@ -2584,8 +2588,7 @@ var Vue = (function () {
2584
2588
  }
2585
2589
  }
2586
2590
  function queueFlush() {
2587
- if (!isFlushing && !isFlushPending) {
2588
- isFlushPending = true;
2591
+ if (!currentFlushPromise) {
2589
2592
  currentFlushPromise = resolvedPromise.then(flushJobs);
2590
2593
  }
2591
2594
  }
@@ -2602,7 +2605,7 @@ var Vue = (function () {
2602
2605
  }
2603
2606
  queueFlush();
2604
2607
  }
2605
- function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
2608
+ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2606
2609
  {
2607
2610
  seen = seen || /* @__PURE__ */ new Map();
2608
2611
  }
@@ -2658,8 +2661,6 @@ var Vue = (function () {
2658
2661
  }
2659
2662
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2660
2663
  function flushJobs(seen) {
2661
- isFlushPending = false;
2662
- isFlushing = true;
2663
2664
  {
2664
2665
  seen = seen || /* @__PURE__ */ new Map();
2665
2666
  }
@@ -2691,10 +2692,9 @@ var Vue = (function () {
2691
2692
  job.flags &= ~1;
2692
2693
  }
2693
2694
  }
2694
- flushIndex = 0;
2695
+ flushIndex = -1;
2695
2696
  queue.length = 0;
2696
2697
  flushPostFlushCbs(seen);
2697
- isFlushing = false;
2698
2698
  currentFlushPromise = null;
2699
2699
  if (queue.length || pendingPostFlushCbs.length) {
2700
2700
  flushJobs(seen);
@@ -7166,7 +7166,7 @@ If this is a native custom element, make sure to exclude it from component resol
7166
7166
  return vm;
7167
7167
  }
7168
7168
  }
7169
- Vue.version = `2.6.14-compat:${"3.5.10"}`;
7169
+ Vue.version = `2.6.14-compat:${"3.5.11"}`;
7170
7170
  Vue.config = singletonApp.config;
7171
7171
  Vue.use = (plugin, ...options) => {
7172
7172
  if (plugin && isFunction(plugin.install)) {
@@ -12244,7 +12244,7 @@ Component that was made reactive: `,
12244
12244
  return true;
12245
12245
  }
12246
12246
 
12247
- const version = "3.5.10";
12247
+ const version = "3.5.11";
12248
12248
  const warn = warn$1 ;
12249
12249
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12250
12250
  const devtools = devtools$1 ;