@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
  **/
@@ -557,8 +557,14 @@ class ReactiveEffect {
557
557
  }
558
558
  let batchDepth = 0;
559
559
  let batchedSub;
560
- function batch(sub) {
560
+ let batchedComputed;
561
+ function batch(sub, isComputed = false) {
561
562
  sub.flags |= 8;
563
+ if (isComputed) {
564
+ sub.next = batchedComputed;
565
+ batchedComputed = sub;
566
+ return;
567
+ }
562
568
  sub.next = batchedSub;
563
569
  batchedSub = sub;
564
570
  }
@@ -569,20 +575,22 @@ function endBatch() {
569
575
  if (--batchDepth > 0) {
570
576
  return;
571
577
  }
578
+ if (batchedComputed) {
579
+ let e = batchedComputed;
580
+ batchedComputed = void 0;
581
+ while (e) {
582
+ const next = e.next;
583
+ e.next = void 0;
584
+ e.flags &= ~8;
585
+ e = next;
586
+ }
587
+ }
572
588
  let error;
573
589
  while (batchedSub) {
574
590
  let e = batchedSub;
575
- let next;
576
- while (e) {
577
- if (!(e.flags & 1)) {
578
- e.flags &= ~8;
579
- }
580
- e = e.next;
581
- }
582
- e = batchedSub;
583
591
  batchedSub = void 0;
584
592
  while (e) {
585
- next = e.next;
593
+ const next = e.next;
586
594
  e.next = void 0;
587
595
  e.flags &= ~8;
588
596
  if (e.flags & 1) {
@@ -778,7 +786,6 @@ class Dep {
778
786
  /**
779
787
  * For object property deps cleanup
780
788
  */
781
- this.target = void 0;
782
789
  this.map = void 0;
783
790
  this.key = void 0;
784
791
  /**
@@ -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
  }
@@ -1942,7 +1948,7 @@ class ComputedRefImpl {
1942
1948
  this.flags |= 16;
1943
1949
  if (!(this.flags & 8) && // avoid infinite self recursion
1944
1950
  activeSub !== this) {
1945
- batch(this);
1951
+ batch(this, true);
1946
1952
  return true;
1947
1953
  }
1948
1954
  }
@@ -2464,10 +2470,8 @@ function logError(err, type, contextVNode, throwInDev = true, throwInProd = fals
2464
2470
  }
2465
2471
  }
2466
2472
 
2467
- let isFlushing = false;
2468
- let isFlushPending = false;
2469
2473
  const queue = [];
2470
- let flushIndex = 0;
2474
+ let flushIndex = -1;
2471
2475
  const pendingPostFlushCbs = [];
2472
2476
  let activePostFlushCbs = null;
2473
2477
  let postFlushIndex = 0;
@@ -2479,7 +2483,7 @@ function nextTick(fn) {
2479
2483
  return fn ? p.then(this ? fn.bind(this) : fn) : p;
2480
2484
  }
2481
2485
  function findInsertionIndex(id) {
2482
- let start = isFlushing ? flushIndex + 1 : 0;
2486
+ let start = flushIndex + 1;
2483
2487
  let end = queue.length;
2484
2488
  while (start < end) {
2485
2489
  const middle = start + end >>> 1;
@@ -2508,8 +2512,7 @@ function queueJob(job) {
2508
2512
  }
2509
2513
  }
2510
2514
  function queueFlush() {
2511
- if (!isFlushing && !isFlushPending) {
2512
- isFlushPending = true;
2515
+ if (!currentFlushPromise) {
2513
2516
  currentFlushPromise = resolvedPromise.then(flushJobs);
2514
2517
  }
2515
2518
  }
@@ -2526,7 +2529,7 @@ function queuePostFlushCb(cb) {
2526
2529
  }
2527
2530
  queueFlush();
2528
2531
  }
2529
- function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
2532
+ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2530
2533
  {
2531
2534
  seen = seen || /* @__PURE__ */ new Map();
2532
2535
  }
@@ -2582,8 +2585,6 @@ function flushPostFlushCbs(seen) {
2582
2585
  }
2583
2586
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2584
2587
  function flushJobs(seen) {
2585
- isFlushPending = false;
2586
- isFlushing = true;
2587
2588
  {
2588
2589
  seen = seen || /* @__PURE__ */ new Map();
2589
2590
  }
@@ -2615,10 +2616,9 @@ function flushJobs(seen) {
2615
2616
  job.flags &= ~1;
2616
2617
  }
2617
2618
  }
2618
- flushIndex = 0;
2619
+ flushIndex = -1;
2619
2620
  queue.length = 0;
2620
2621
  flushPostFlushCbs(seen);
2621
- isFlushing = false;
2622
2622
  currentFlushPromise = null;
2623
2623
  if (queue.length || pendingPostFlushCbs.length) {
2624
2624
  flushJobs(seen);
@@ -7099,7 +7099,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7099
7099
  return vm;
7100
7100
  }
7101
7101
  }
7102
- Vue.version = `2.6.14-compat:${"3.5.10"}`;
7102
+ Vue.version = `2.6.14-compat:${"3.5.11"}`;
7103
7103
  Vue.config = singletonApp.config;
7104
7104
  Vue.use = (plugin, ...options) => {
7105
7105
  if (plugin && isFunction(plugin.install)) {
@@ -12214,7 +12214,7 @@ function isMemoSame(cached, memo) {
12214
12214
  return true;
12215
12215
  }
12216
12216
 
12217
- const version = "3.5.10";
12217
+ const version = "3.5.11";
12218
12218
  const warn = warn$1 ;
12219
12219
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12220
12220
  const devtools = devtools$1 ;