vue 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.
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.5.9
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.9
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.9
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,17 +648,24 @@ function endBatch() {
642
648
  if (--batchDepth > 0) {
643
649
  return;
644
650
  }
645
- let error;
646
- while (batchedSub) {
647
- let e = batchedSub;
648
- let next;
651
+ if (batchedComputed) {
652
+ let e = batchedComputed;
653
+ batchedComputed = void 0;
649
654
  while (e) {
655
+ const next = e.next;
656
+ e.next = void 0;
650
657
  e.flags &= ~8;
651
- e = e.next;
658
+ e = next;
652
659
  }
653
- e = batchedSub;
660
+ }
661
+ let error;
662
+ while (batchedSub) {
663
+ let e = batchedSub;
654
664
  batchedSub = void 0;
655
665
  while (e) {
666
+ const next = e.next;
667
+ e.next = void 0;
668
+ e.flags &= ~8;
656
669
  if (e.flags & 1) {
657
670
  try {
658
671
  ;
@@ -661,8 +674,6 @@ function endBatch() {
661
674
  if (!error) error = err;
662
675
  }
663
676
  }
664
- next = e.next;
665
- e.next = void 0;
666
677
  e = next;
667
678
  }
668
679
  }
@@ -848,7 +859,6 @@ class Dep {
848
859
  /**
849
860
  * For object property deps cleanup
850
861
  */
851
- this.target = void 0;
852
862
  this.map = void 0;
853
863
  this.key = void 0;
854
864
  /**
@@ -976,7 +986,6 @@ function track(target, type, key) {
976
986
  let dep = depsMap.get(key);
977
987
  if (!dep) {
978
988
  depsMap.set(key, dep = new Dep());
979
- dep.target = target;
980
989
  dep.map = depsMap;
981
990
  dep.key = key;
982
991
  }
@@ -1996,6 +2005,10 @@ class ComputedRefImpl {
1996
2005
  * @internal
1997
2006
  */
1998
2007
  this.globalVersion = globalVersion - 1;
2008
+ /**
2009
+ * @internal
2010
+ */
2011
+ this.next = void 0;
1999
2012
  // for backwards compat
2000
2013
  this.effect = this;
2001
2014
  this["__v_isReadonly"] = !setter;
@@ -2008,7 +2021,7 @@ class ComputedRefImpl {
2008
2021
  this.flags |= 16;
2009
2022
  if (!(this.flags & 8) && // avoid infinite self recursion
2010
2023
  activeSub !== this) {
2011
- batch(this);
2024
+ batch(this, true);
2012
2025
  return true;
2013
2026
  }
2014
2027
  }
@@ -2530,10 +2543,8 @@ function logError(err, type, contextVNode, throwInDev = true, throwInProd = fals
2530
2543
  }
2531
2544
  }
2532
2545
 
2533
- let isFlushing = false;
2534
- let isFlushPending = false;
2535
2546
  const queue = [];
2536
- let flushIndex = 0;
2547
+ let flushIndex = -1;
2537
2548
  const pendingPostFlushCbs = [];
2538
2549
  let activePostFlushCbs = null;
2539
2550
  let postFlushIndex = 0;
@@ -2545,7 +2556,7 @@ function nextTick(fn) {
2545
2556
  return fn ? p.then(this ? fn.bind(this) : fn) : p;
2546
2557
  }
2547
2558
  function findInsertionIndex(id) {
2548
- let start = isFlushing ? flushIndex + 1 : 0;
2559
+ let start = flushIndex + 1;
2549
2560
  let end = queue.length;
2550
2561
  while (start < end) {
2551
2562
  const middle = start + end >>> 1;
@@ -2574,8 +2585,7 @@ function queueJob(job) {
2574
2585
  }
2575
2586
  }
2576
2587
  function queueFlush() {
2577
- if (!isFlushing && !isFlushPending) {
2578
- isFlushPending = true;
2588
+ if (!currentFlushPromise) {
2579
2589
  currentFlushPromise = resolvedPromise.then(flushJobs);
2580
2590
  }
2581
2591
  }
@@ -2592,7 +2602,7 @@ function queuePostFlushCb(cb) {
2592
2602
  }
2593
2603
  queueFlush();
2594
2604
  }
2595
- function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
2605
+ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2596
2606
  {
2597
2607
  seen = seen || /* @__PURE__ */ new Map();
2598
2608
  }
@@ -2648,8 +2658,6 @@ function flushPostFlushCbs(seen) {
2648
2658
  }
2649
2659
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2650
2660
  function flushJobs(seen) {
2651
- isFlushPending = false;
2652
- isFlushing = true;
2653
2661
  {
2654
2662
  seen = seen || /* @__PURE__ */ new Map();
2655
2663
  }
@@ -2681,10 +2689,9 @@ function flushJobs(seen) {
2681
2689
  job.flags &= ~1;
2682
2690
  }
2683
2691
  }
2684
- flushIndex = 0;
2692
+ flushIndex = -1;
2685
2693
  queue.length = 0;
2686
2694
  flushPostFlushCbs(seen);
2687
- isFlushing = false;
2688
2695
  currentFlushPromise = null;
2689
2696
  if (queue.length || pendingPostFlushCbs.length) {
2690
2697
  flushJobs(seen);
@@ -10518,7 +10525,7 @@ function isMemoSame(cached, memo) {
10518
10525
  return true;
10519
10526
  }
10520
10527
 
10521
- const version = "3.5.9";
10528
+ const version = "3.5.11";
10522
10529
  const warn = warn$1 ;
10523
10530
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10524
10531
  const devtools = devtools$1 ;
@@ -11305,6 +11312,11 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
11305
11312
  if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
11306
11313
  patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
11307
11314
  }
11315
+ } else if (
11316
+ // #11081 force set props for possible async custom element
11317
+ el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
11318
+ ) {
11319
+ patchDOMProp(el, camelize(key), nextValue);
11308
11320
  } else {
11309
11321
  if (key === "true-value") {
11310
11322
  el._trueValue = nextValue;
@@ -11345,13 +11357,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
11345
11357
  if (isNativeOn(key) && isString(value)) {
11346
11358
  return false;
11347
11359
  }
11348
- if (key in el) {
11349
- return true;
11350
- }
11351
- if (el._isVueCE && (/[A-Z]/.test(key) || !isString(value))) {
11352
- return true;
11353
- }
11354
- return false;
11360
+ return key in el;
11355
11361
  }
11356
11362
 
11357
11363
  const REMOVAL = {};