@vue/compat 3.5.9 → 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.9
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,17 +575,24 @@ function endBatch() {
569
575
  if (--batchDepth > 0) {
570
576
  return;
571
577
  }
572
- let error;
573
- while (batchedSub) {
574
- let e = batchedSub;
575
- let next;
578
+ if (batchedComputed) {
579
+ let e = batchedComputed;
580
+ batchedComputed = void 0;
576
581
  while (e) {
582
+ const next = e.next;
583
+ e.next = void 0;
577
584
  e.flags &= ~8;
578
- e = e.next;
585
+ e = next;
579
586
  }
580
- e = batchedSub;
587
+ }
588
+ let error;
589
+ while (batchedSub) {
590
+ let e = batchedSub;
581
591
  batchedSub = void 0;
582
592
  while (e) {
593
+ const next = e.next;
594
+ e.next = void 0;
595
+ e.flags &= ~8;
583
596
  if (e.flags & 1) {
584
597
  try {
585
598
  ;
@@ -588,8 +601,6 @@ function endBatch() {
588
601
  if (!error) error = err;
589
602
  }
590
603
  }
591
- next = e.next;
592
- e.next = void 0;
593
604
  e = next;
594
605
  }
595
606
  }
@@ -775,7 +786,6 @@ class Dep {
775
786
  /**
776
787
  * For object property deps cleanup
777
788
  */
778
- this.target = void 0;
779
789
  this.map = void 0;
780
790
  this.key = void 0;
781
791
  /**
@@ -903,7 +913,6 @@ function track(target, type, key) {
903
913
  let dep = depsMap.get(key);
904
914
  if (!dep) {
905
915
  depsMap.set(key, dep = new Dep());
906
- dep.target = target;
907
916
  dep.map = depsMap;
908
917
  dep.key = key;
909
918
  }
@@ -1923,6 +1932,10 @@ class ComputedRefImpl {
1923
1932
  * @internal
1924
1933
  */
1925
1934
  this.globalVersion = globalVersion - 1;
1935
+ /**
1936
+ * @internal
1937
+ */
1938
+ this.next = void 0;
1926
1939
  // for backwards compat
1927
1940
  this.effect = this;
1928
1941
  this["__v_isReadonly"] = !setter;
@@ -1935,7 +1948,7 @@ class ComputedRefImpl {
1935
1948
  this.flags |= 16;
1936
1949
  if (!(this.flags & 8) && // avoid infinite self recursion
1937
1950
  activeSub !== this) {
1938
- batch(this);
1951
+ batch(this, true);
1939
1952
  return true;
1940
1953
  }
1941
1954
  }
@@ -2457,10 +2470,8 @@ function logError(err, type, contextVNode, throwInDev = true, throwInProd = fals
2457
2470
  }
2458
2471
  }
2459
2472
 
2460
- let isFlushing = false;
2461
- let isFlushPending = false;
2462
2473
  const queue = [];
2463
- let flushIndex = 0;
2474
+ let flushIndex = -1;
2464
2475
  const pendingPostFlushCbs = [];
2465
2476
  let activePostFlushCbs = null;
2466
2477
  let postFlushIndex = 0;
@@ -2472,7 +2483,7 @@ function nextTick(fn) {
2472
2483
  return fn ? p.then(this ? fn.bind(this) : fn) : p;
2473
2484
  }
2474
2485
  function findInsertionIndex(id) {
2475
- let start = isFlushing ? flushIndex + 1 : 0;
2486
+ let start = flushIndex + 1;
2476
2487
  let end = queue.length;
2477
2488
  while (start < end) {
2478
2489
  const middle = start + end >>> 1;
@@ -2501,8 +2512,7 @@ function queueJob(job) {
2501
2512
  }
2502
2513
  }
2503
2514
  function queueFlush() {
2504
- if (!isFlushing && !isFlushPending) {
2505
- isFlushPending = true;
2515
+ if (!currentFlushPromise) {
2506
2516
  currentFlushPromise = resolvedPromise.then(flushJobs);
2507
2517
  }
2508
2518
  }
@@ -2519,7 +2529,7 @@ function queuePostFlushCb(cb) {
2519
2529
  }
2520
2530
  queueFlush();
2521
2531
  }
2522
- function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
2532
+ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2523
2533
  {
2524
2534
  seen = seen || /* @__PURE__ */ new Map();
2525
2535
  }
@@ -2575,8 +2585,6 @@ function flushPostFlushCbs(seen) {
2575
2585
  }
2576
2586
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2577
2587
  function flushJobs(seen) {
2578
- isFlushPending = false;
2579
- isFlushing = true;
2580
2588
  {
2581
2589
  seen = seen || /* @__PURE__ */ new Map();
2582
2590
  }
@@ -2608,10 +2616,9 @@ function flushJobs(seen) {
2608
2616
  job.flags &= ~1;
2609
2617
  }
2610
2618
  }
2611
- flushIndex = 0;
2619
+ flushIndex = -1;
2612
2620
  queue.length = 0;
2613
2621
  flushPostFlushCbs(seen);
2614
- isFlushing = false;
2615
2622
  currentFlushPromise = null;
2616
2623
  if (queue.length || pendingPostFlushCbs.length) {
2617
2624
  flushJobs(seen);
@@ -7092,7 +7099,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7092
7099
  return vm;
7093
7100
  }
7094
7101
  }
7095
- Vue.version = `2.6.14-compat:${"3.5.9"}`;
7102
+ Vue.version = `2.6.14-compat:${"3.5.11"}`;
7096
7103
  Vue.config = singletonApp.config;
7097
7104
  Vue.use = (plugin, ...options) => {
7098
7105
  if (plugin && isFunction(plugin.install)) {
@@ -12207,7 +12214,7 @@ function isMemoSame(cached, memo) {
12207
12214
  return true;
12208
12215
  }
12209
12216
 
12210
- const version = "3.5.9";
12217
+ const version = "3.5.11";
12211
12218
  const warn = warn$1 ;
12212
12219
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12213
12220
  const devtools = devtools$1 ;
@@ -13082,6 +13089,11 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
13082
13089
  if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
13083
13090
  patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
13084
13091
  }
13092
+ } else if (
13093
+ // #11081 force set props for possible async custom element
13094
+ el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
13095
+ ) {
13096
+ patchDOMProp(el, camelize(key), nextValue, parentComponent);
13085
13097
  } else {
13086
13098
  if (key === "true-value") {
13087
13099
  el._trueValue = nextValue;
@@ -13122,13 +13134,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
13122
13134
  if (isNativeOn(key) && isString(value)) {
13123
13135
  return false;
13124
13136
  }
13125
- if (key in el) {
13126
- return true;
13127
- }
13128
- if (el._isVueCE && (/[A-Z]/.test(key) || !isString(value))) {
13129
- return true;
13130
- }
13131
- return false;
13137
+ return key in el;
13132
13138
  }
13133
13139
 
13134
13140
  const REMOVAL = {};