@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.
package/dist/vue.cjs.js CHANGED
@@ -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
  **/
@@ -683,8 +683,14 @@ class ReactiveEffect {
683
683
  }
684
684
  let batchDepth = 0;
685
685
  let batchedSub;
686
- function batch(sub) {
686
+ let batchedComputed;
687
+ function batch(sub, isComputed = false) {
687
688
  sub.flags |= 8;
689
+ if (isComputed) {
690
+ sub.next = batchedComputed;
691
+ batchedComputed = sub;
692
+ return;
693
+ }
688
694
  sub.next = batchedSub;
689
695
  batchedSub = sub;
690
696
  }
@@ -695,20 +701,22 @@ function endBatch() {
695
701
  if (--batchDepth > 0) {
696
702
  return;
697
703
  }
704
+ if (batchedComputed) {
705
+ let e = batchedComputed;
706
+ batchedComputed = void 0;
707
+ while (e) {
708
+ const next = e.next;
709
+ e.next = void 0;
710
+ e.flags &= ~8;
711
+ e = next;
712
+ }
713
+ }
698
714
  let error;
699
715
  while (batchedSub) {
700
716
  let e = batchedSub;
701
- let next;
702
- while (e) {
703
- if (!(e.flags & 1)) {
704
- e.flags &= ~8;
705
- }
706
- e = e.next;
707
- }
708
- e = batchedSub;
709
717
  batchedSub = void 0;
710
718
  while (e) {
711
- next = e.next;
719
+ const next = e.next;
712
720
  e.next = void 0;
713
721
  e.flags &= ~8;
714
722
  if (e.flags & 1) {
@@ -904,7 +912,6 @@ class Dep {
904
912
  /**
905
913
  * For object property deps cleanup
906
914
  */
907
- this.target = void 0;
908
915
  this.map = void 0;
909
916
  this.key = void 0;
910
917
  /**
@@ -1032,7 +1039,6 @@ function track(target, type, key) {
1032
1039
  let dep = depsMap.get(key);
1033
1040
  if (!dep) {
1034
1041
  depsMap.set(key, dep = new Dep());
1035
- dep.target = target;
1036
1042
  dep.map = depsMap;
1037
1043
  dep.key = key;
1038
1044
  }
@@ -2068,7 +2074,7 @@ class ComputedRefImpl {
2068
2074
  this.flags |= 16;
2069
2075
  if (!(this.flags & 8) && // avoid infinite self recursion
2070
2076
  activeSub !== this) {
2071
- batch(this);
2077
+ batch(this, true);
2072
2078
  return true;
2073
2079
  }
2074
2080
  }
@@ -2590,10 +2596,8 @@ function logError(err, type, contextVNode, throwInDev = true, throwInProd = fals
2590
2596
  }
2591
2597
  }
2592
2598
 
2593
- let isFlushing = false;
2594
- let isFlushPending = false;
2595
2599
  const queue = [];
2596
- let flushIndex = 0;
2600
+ let flushIndex = -1;
2597
2601
  const pendingPostFlushCbs = [];
2598
2602
  let activePostFlushCbs = null;
2599
2603
  let postFlushIndex = 0;
@@ -2605,7 +2609,7 @@ function nextTick(fn) {
2605
2609
  return fn ? p.then(this ? fn.bind(this) : fn) : p;
2606
2610
  }
2607
2611
  function findInsertionIndex(id) {
2608
- let start = isFlushing ? flushIndex + 1 : 0;
2612
+ let start = flushIndex + 1;
2609
2613
  let end = queue.length;
2610
2614
  while (start < end) {
2611
2615
  const middle = start + end >>> 1;
@@ -2634,8 +2638,7 @@ function queueJob(job) {
2634
2638
  }
2635
2639
  }
2636
2640
  function queueFlush() {
2637
- if (!isFlushing && !isFlushPending) {
2638
- isFlushPending = true;
2641
+ if (!currentFlushPromise) {
2639
2642
  currentFlushPromise = resolvedPromise.then(flushJobs);
2640
2643
  }
2641
2644
  }
@@ -2652,7 +2655,7 @@ function queuePostFlushCb(cb) {
2652
2655
  }
2653
2656
  queueFlush();
2654
2657
  }
2655
- function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
2658
+ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2656
2659
  {
2657
2660
  seen = seen || /* @__PURE__ */ new Map();
2658
2661
  }
@@ -2708,8 +2711,6 @@ function flushPostFlushCbs(seen) {
2708
2711
  }
2709
2712
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2710
2713
  function flushJobs(seen) {
2711
- isFlushPending = false;
2712
- isFlushing = true;
2713
2714
  {
2714
2715
  seen = seen || /* @__PURE__ */ new Map();
2715
2716
  }
@@ -2741,10 +2742,9 @@ function flushJobs(seen) {
2741
2742
  job.flags &= ~1;
2742
2743
  }
2743
2744
  }
2744
- flushIndex = 0;
2745
+ flushIndex = -1;
2745
2746
  queue.length = 0;
2746
2747
  flushPostFlushCbs(seen);
2747
- isFlushing = false;
2748
2748
  currentFlushPromise = null;
2749
2749
  if (queue.length || pendingPostFlushCbs.length) {
2750
2750
  flushJobs(seen);
@@ -7225,7 +7225,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7225
7225
  return vm;
7226
7226
  }
7227
7227
  }
7228
- Vue.version = `2.6.14-compat:${"3.5.10"}`;
7228
+ Vue.version = `2.6.14-compat:${"3.5.11"}`;
7229
7229
  Vue.config = singletonApp.config;
7230
7230
  Vue.use = (plugin, ...options) => {
7231
7231
  if (plugin && isFunction(plugin.install)) {
@@ -12340,7 +12340,7 @@ function isMemoSame(cached, memo) {
12340
12340
  return true;
12341
12341
  }
12342
12342
 
12343
- const version = "3.5.10";
12343
+ const version = "3.5.11";
12344
12344
  const warn = warn$1 ;
12345
12345
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12346
12346
  const devtools = devtools$1 ;
@@ -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
  **/
@@ -589,8 +589,14 @@ class ReactiveEffect {
589
589
  }
590
590
  let batchDepth = 0;
591
591
  let batchedSub;
592
- function batch(sub) {
592
+ let batchedComputed;
593
+ function batch(sub, isComputed = false) {
593
594
  sub.flags |= 8;
595
+ if (isComputed) {
596
+ sub.next = batchedComputed;
597
+ batchedComputed = sub;
598
+ return;
599
+ }
594
600
  sub.next = batchedSub;
595
601
  batchedSub = sub;
596
602
  }
@@ -601,20 +607,22 @@ function endBatch() {
601
607
  if (--batchDepth > 0) {
602
608
  return;
603
609
  }
610
+ if (batchedComputed) {
611
+ let e = batchedComputed;
612
+ batchedComputed = void 0;
613
+ while (e) {
614
+ const next = e.next;
615
+ e.next = void 0;
616
+ e.flags &= ~8;
617
+ e = next;
618
+ }
619
+ }
604
620
  let error;
605
621
  while (batchedSub) {
606
622
  let e = batchedSub;
607
- let next;
608
- while (e) {
609
- if (!(e.flags & 1)) {
610
- e.flags &= ~8;
611
- }
612
- e = e.next;
613
- }
614
- e = batchedSub;
615
623
  batchedSub = void 0;
616
624
  while (e) {
617
- next = e.next;
625
+ const next = e.next;
618
626
  e.next = void 0;
619
627
  e.flags &= ~8;
620
628
  if (e.flags & 1) {
@@ -807,7 +815,6 @@ class Dep {
807
815
  /**
808
816
  * For object property deps cleanup
809
817
  */
810
- this.target = void 0;
811
818
  this.map = void 0;
812
819
  this.key = void 0;
813
820
  /**
@@ -906,7 +913,6 @@ function track(target, type, key) {
906
913
  let dep = depsMap.get(key);
907
914
  if (!dep) {
908
915
  depsMap.set(key, dep = new Dep());
909
- dep.target = target;
910
916
  dep.map = depsMap;
911
917
  dep.key = key;
912
918
  }
@@ -1873,7 +1879,7 @@ class ComputedRefImpl {
1873
1879
  this.flags |= 16;
1874
1880
  if (!(this.flags & 8) && // avoid infinite self recursion
1875
1881
  activeSub !== this) {
1876
- batch(this);
1882
+ batch(this, true);
1877
1883
  return true;
1878
1884
  }
1879
1885
  }
@@ -2239,10 +2245,8 @@ function logError(err, type, contextVNode, throwInDev = true, throwInProd = fals
2239
2245
  }
2240
2246
  }
2241
2247
 
2242
- let isFlushing = false;
2243
- let isFlushPending = false;
2244
2248
  const queue = [];
2245
- let flushIndex = 0;
2249
+ let flushIndex = -1;
2246
2250
  const pendingPostFlushCbs = [];
2247
2251
  let activePostFlushCbs = null;
2248
2252
  let postFlushIndex = 0;
@@ -2253,7 +2257,7 @@ function nextTick(fn) {
2253
2257
  return fn ? p.then(this ? fn.bind(this) : fn) : p;
2254
2258
  }
2255
2259
  function findInsertionIndex(id) {
2256
- let start = isFlushing ? flushIndex + 1 : 0;
2260
+ let start = flushIndex + 1;
2257
2261
  let end = queue.length;
2258
2262
  while (start < end) {
2259
2263
  const middle = start + end >>> 1;
@@ -2282,8 +2286,7 @@ function queueJob(job) {
2282
2286
  }
2283
2287
  }
2284
2288
  function queueFlush() {
2285
- if (!isFlushing && !isFlushPending) {
2286
- isFlushPending = true;
2289
+ if (!currentFlushPromise) {
2287
2290
  currentFlushPromise = resolvedPromise.then(flushJobs);
2288
2291
  }
2289
2292
  }
@@ -2300,7 +2303,7 @@ function queuePostFlushCb(cb) {
2300
2303
  }
2301
2304
  queueFlush();
2302
2305
  }
2303
- function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
2306
+ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2304
2307
  for (; i < queue.length; i++) {
2305
2308
  const cb = queue[i];
2306
2309
  if (cb && cb.flags & 2) {
@@ -2344,8 +2347,6 @@ function flushPostFlushCbs(seen) {
2344
2347
  }
2345
2348
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2346
2349
  function flushJobs(seen) {
2347
- isFlushPending = false;
2348
- isFlushing = true;
2349
2350
  try {
2350
2351
  for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
2351
2352
  const job = queue[flushIndex];
@@ -2371,10 +2372,9 @@ function flushJobs(seen) {
2371
2372
  job.flags &= ~1;
2372
2373
  }
2373
2374
  }
2374
- flushIndex = 0;
2375
+ flushIndex = -1;
2375
2376
  queue.length = 0;
2376
2377
  flushPostFlushCbs();
2377
- isFlushing = false;
2378
2378
  currentFlushPromise = null;
2379
2379
  if (queue.length || pendingPostFlushCbs.length) {
2380
2380
  flushJobs();
@@ -5814,7 +5814,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5814
5814
  return vm;
5815
5815
  }
5816
5816
  }
5817
- Vue.version = `2.6.14-compat:${"3.5.10"}`;
5817
+ Vue.version = `2.6.14-compat:${"3.5.11"}`;
5818
5818
  Vue.config = singletonApp.config;
5819
5819
  Vue.use = (plugin, ...options) => {
5820
5820
  if (plugin && isFunction(plugin.install)) {
@@ -9935,7 +9935,7 @@ function isMemoSame(cached, memo) {
9935
9935
  return true;
9936
9936
  }
9937
9937
 
9938
- const version = "3.5.10";
9938
+ const version = "3.5.11";
9939
9939
  const warn$1 = NOOP;
9940
9940
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9941
9941
  const devtools = 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
  **/
@@ -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);
@@ -7172,7 +7172,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7172
7172
  return vm;
7173
7173
  }
7174
7174
  }
7175
- Vue.version = `2.6.14-compat:${"3.5.10"}`;
7175
+ Vue.version = `2.6.14-compat:${"3.5.11"}`;
7176
7176
  Vue.config = singletonApp.config;
7177
7177
  Vue.use = (plugin, ...options) => {
7178
7178
  if (plugin && isFunction(plugin.install)) {
@@ -12287,7 +12287,7 @@ function isMemoSame(cached, memo) {
12287
12287
  return true;
12288
12288
  }
12289
12289
 
12290
- const version = "3.5.10";
12290
+ const version = "3.5.11";
12291
12291
  const warn = warn$1 ;
12292
12292
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12293
12293
  const devtools = devtools$1 ;