@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
  }
@@ -1933,6 +1942,10 @@ class ComputedRefImpl {
1933
1942
  * @internal
1934
1943
  */
1935
1944
  this.globalVersion = globalVersion - 1;
1945
+ /**
1946
+ * @internal
1947
+ */
1948
+ this.next = void 0;
1936
1949
  // for backwards compat
1937
1950
  this.effect = this;
1938
1951
  this["__v_isReadonly"] = !setter;
@@ -1945,7 +1958,7 @@ class ComputedRefImpl {
1945
1958
  this.flags |= 16;
1946
1959
  if (!(this.flags & 8) && // avoid infinite self recursion
1947
1960
  activeSub !== this) {
1948
- batch(this);
1961
+ batch(this, true);
1949
1962
  return true;
1950
1963
  } else if (!!(process.env.NODE_ENV !== "production")) ;
1951
1964
  }
@@ -2472,10 +2485,8 @@ function logError(err, type, contextVNode, throwInDev = true, throwInProd = fals
2472
2485
  }
2473
2486
  }
2474
2487
 
2475
- let isFlushing = false;
2476
- let isFlushPending = false;
2477
2488
  const queue = [];
2478
- let flushIndex = 0;
2489
+ let flushIndex = -1;
2479
2490
  const pendingPostFlushCbs = [];
2480
2491
  let activePostFlushCbs = null;
2481
2492
  let postFlushIndex = 0;
@@ -2487,7 +2498,7 @@ function nextTick(fn) {
2487
2498
  return fn ? p.then(this ? fn.bind(this) : fn) : p;
2488
2499
  }
2489
2500
  function findInsertionIndex(id) {
2490
- let start = isFlushing ? flushIndex + 1 : 0;
2501
+ let start = flushIndex + 1;
2491
2502
  let end = queue.length;
2492
2503
  while (start < end) {
2493
2504
  const middle = start + end >>> 1;
@@ -2516,8 +2527,7 @@ function queueJob(job) {
2516
2527
  }
2517
2528
  }
2518
2529
  function queueFlush() {
2519
- if (!isFlushing && !isFlushPending) {
2520
- isFlushPending = true;
2530
+ if (!currentFlushPromise) {
2521
2531
  currentFlushPromise = resolvedPromise.then(flushJobs);
2522
2532
  }
2523
2533
  }
@@ -2534,7 +2544,7 @@ function queuePostFlushCb(cb) {
2534
2544
  }
2535
2545
  queueFlush();
2536
2546
  }
2537
- function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
2547
+ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2538
2548
  if (!!(process.env.NODE_ENV !== "production")) {
2539
2549
  seen = seen || /* @__PURE__ */ new Map();
2540
2550
  }
@@ -2590,8 +2600,6 @@ function flushPostFlushCbs(seen) {
2590
2600
  }
2591
2601
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2592
2602
  function flushJobs(seen) {
2593
- isFlushPending = false;
2594
- isFlushing = true;
2595
2603
  if (!!(process.env.NODE_ENV !== "production")) {
2596
2604
  seen = seen || /* @__PURE__ */ new Map();
2597
2605
  }
@@ -2623,10 +2631,9 @@ function flushJobs(seen) {
2623
2631
  job.flags &= ~1;
2624
2632
  }
2625
2633
  }
2626
- flushIndex = 0;
2634
+ flushIndex = -1;
2627
2635
  queue.length = 0;
2628
2636
  flushPostFlushCbs(seen);
2629
- isFlushing = false;
2630
2637
  currentFlushPromise = null;
2631
2638
  if (queue.length || pendingPostFlushCbs.length) {
2632
2639
  flushJobs(seen);
@@ -7124,7 +7131,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7124
7131
  return vm;
7125
7132
  }
7126
7133
  }
7127
- Vue.version = `2.6.14-compat:${"3.5.9"}`;
7134
+ Vue.version = `2.6.14-compat:${"3.5.11"}`;
7128
7135
  Vue.config = singletonApp.config;
7129
7136
  Vue.use = (plugin, ...options) => {
7130
7137
  if (plugin && isFunction(plugin.install)) {
@@ -12293,7 +12300,7 @@ function isMemoSame(cached, memo) {
12293
12300
  return true;
12294
12301
  }
12295
12302
 
12296
- const version = "3.5.9";
12303
+ const version = "3.5.11";
12297
12304
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
12298
12305
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12299
12306
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -13168,6 +13175,11 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
13168
13175
  if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
13169
13176
  patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
13170
13177
  }
13178
+ } else if (
13179
+ // #11081 force set props for possible async custom element
13180
+ el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
13181
+ ) {
13182
+ patchDOMProp(el, camelize(key), nextValue, parentComponent);
13171
13183
  } else {
13172
13184
  if (key === "true-value") {
13173
13185
  el._trueValue = nextValue;
@@ -13208,13 +13220,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
13208
13220
  if (isNativeOn(key) && isString(value)) {
13209
13221
  return false;
13210
13222
  }
13211
- if (key in el) {
13212
- return true;
13213
- }
13214
- if (el._isVueCE && (/[A-Z]/.test(key) || !isString(value))) {
13215
- return true;
13216
- }
13217
- return false;
13223
+ return key in el;
13218
13224
  }
13219
13225
 
13220
13226
  const REMOVAL = {};
@@ -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
  **/
@@ -560,8 +560,14 @@ var Vue = (function () {
560
560
  }
561
561
  let batchDepth = 0;
562
562
  let batchedSub;
563
- function batch(sub) {
563
+ let batchedComputed;
564
+ function batch(sub, isComputed = false) {
564
565
  sub.flags |= 8;
566
+ if (isComputed) {
567
+ sub.next = batchedComputed;
568
+ batchedComputed = sub;
569
+ return;
570
+ }
565
571
  sub.next = batchedSub;
566
572
  batchedSub = sub;
567
573
  }
@@ -572,17 +578,24 @@ var Vue = (function () {
572
578
  if (--batchDepth > 0) {
573
579
  return;
574
580
  }
575
- let error;
576
- while (batchedSub) {
577
- let e = batchedSub;
578
- let next;
581
+ if (batchedComputed) {
582
+ let e = batchedComputed;
583
+ batchedComputed = void 0;
579
584
  while (e) {
585
+ const next = e.next;
586
+ e.next = void 0;
580
587
  e.flags &= ~8;
581
- e = e.next;
588
+ e = next;
582
589
  }
583
- e = batchedSub;
590
+ }
591
+ let error;
592
+ while (batchedSub) {
593
+ let e = batchedSub;
584
594
  batchedSub = void 0;
585
595
  while (e) {
596
+ const next = e.next;
597
+ e.next = void 0;
598
+ e.flags &= ~8;
586
599
  if (e.flags & 1) {
587
600
  try {
588
601
  ;
@@ -591,8 +604,6 @@ var Vue = (function () {
591
604
  if (!error) error = err;
592
605
  }
593
606
  }
594
- next = e.next;
595
- e.next = void 0;
596
607
  e = next;
597
608
  }
598
609
  }
@@ -778,7 +789,6 @@ var Vue = (function () {
778
789
  /**
779
790
  * For object property deps cleanup
780
791
  */
781
- this.target = void 0;
782
792
  this.map = void 0;
783
793
  this.key = void 0;
784
794
  /**
@@ -906,7 +916,6 @@ var Vue = (function () {
906
916
  let dep = depsMap.get(key);
907
917
  if (!dep) {
908
918
  depsMap.set(key, dep = new Dep());
909
- dep.target = target;
910
919
  dep.map = depsMap;
911
920
  dep.key = key;
912
921
  }
@@ -1926,6 +1935,10 @@ var Vue = (function () {
1926
1935
  * @internal
1927
1936
  */
1928
1937
  this.globalVersion = globalVersion - 1;
1938
+ /**
1939
+ * @internal
1940
+ */
1941
+ this.next = void 0;
1929
1942
  // for backwards compat
1930
1943
  this.effect = this;
1931
1944
  this["__v_isReadonly"] = !setter;
@@ -1938,7 +1951,7 @@ var Vue = (function () {
1938
1951
  this.flags |= 16;
1939
1952
  if (!(this.flags & 8) && // avoid infinite self recursion
1940
1953
  activeSub !== this) {
1941
- batch(this);
1954
+ batch(this, true);
1942
1955
  return true;
1943
1956
  }
1944
1957
  }
@@ -2460,10 +2473,8 @@ var Vue = (function () {
2460
2473
  }
2461
2474
  }
2462
2475
 
2463
- let isFlushing = false;
2464
- let isFlushPending = false;
2465
2476
  const queue = [];
2466
- let flushIndex = 0;
2477
+ let flushIndex = -1;
2467
2478
  const pendingPostFlushCbs = [];
2468
2479
  let activePostFlushCbs = null;
2469
2480
  let postFlushIndex = 0;
@@ -2475,7 +2486,7 @@ var Vue = (function () {
2475
2486
  return fn ? p.then(this ? fn.bind(this) : fn) : p;
2476
2487
  }
2477
2488
  function findInsertionIndex(id) {
2478
- let start = isFlushing ? flushIndex + 1 : 0;
2489
+ let start = flushIndex + 1;
2479
2490
  let end = queue.length;
2480
2491
  while (start < end) {
2481
2492
  const middle = start + end >>> 1;
@@ -2504,8 +2515,7 @@ var Vue = (function () {
2504
2515
  }
2505
2516
  }
2506
2517
  function queueFlush() {
2507
- if (!isFlushing && !isFlushPending) {
2508
- isFlushPending = true;
2518
+ if (!currentFlushPromise) {
2509
2519
  currentFlushPromise = resolvedPromise.then(flushJobs);
2510
2520
  }
2511
2521
  }
@@ -2522,7 +2532,7 @@ var Vue = (function () {
2522
2532
  }
2523
2533
  queueFlush();
2524
2534
  }
2525
- function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
2535
+ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2526
2536
  {
2527
2537
  seen = seen || /* @__PURE__ */ new Map();
2528
2538
  }
@@ -2578,8 +2588,6 @@ var Vue = (function () {
2578
2588
  }
2579
2589
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2580
2590
  function flushJobs(seen) {
2581
- isFlushPending = false;
2582
- isFlushing = true;
2583
2591
  {
2584
2592
  seen = seen || /* @__PURE__ */ new Map();
2585
2593
  }
@@ -2611,10 +2619,9 @@ var Vue = (function () {
2611
2619
  job.flags &= ~1;
2612
2620
  }
2613
2621
  }
2614
- flushIndex = 0;
2622
+ flushIndex = -1;
2615
2623
  queue.length = 0;
2616
2624
  flushPostFlushCbs(seen);
2617
- isFlushing = false;
2618
2625
  currentFlushPromise = null;
2619
2626
  if (queue.length || pendingPostFlushCbs.length) {
2620
2627
  flushJobs(seen);
@@ -7086,7 +7093,7 @@ If this is a native custom element, make sure to exclude it from component resol
7086
7093
  return vm;
7087
7094
  }
7088
7095
  }
7089
- Vue.version = `2.6.14-compat:${"3.5.9"}`;
7096
+ Vue.version = `2.6.14-compat:${"3.5.11"}`;
7090
7097
  Vue.config = singletonApp.config;
7091
7098
  Vue.use = (plugin, ...options) => {
7092
7099
  if (plugin && isFunction(plugin.install)) {
@@ -12164,7 +12171,7 @@ Component that was made reactive: `,
12164
12171
  return true;
12165
12172
  }
12166
12173
 
12167
- const version = "3.5.9";
12174
+ const version = "3.5.11";
12168
12175
  const warn = warn$1 ;
12169
12176
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12170
12177
  const devtools = devtools$1 ;
@@ -13020,6 +13027,11 @@ Expected function or array of functions, received type ${typeof value}.`
13020
13027
  if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
13021
13028
  patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
13022
13029
  }
13030
+ } else if (
13031
+ // #11081 force set props for possible async custom element
13032
+ el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
13033
+ ) {
13034
+ patchDOMProp(el, camelize(key), nextValue, parentComponent);
13023
13035
  } else {
13024
13036
  if (key === "true-value") {
13025
13037
  el._trueValue = nextValue;
@@ -13060,13 +13072,7 @@ Expected function or array of functions, received type ${typeof value}.`
13060
13072
  if (isNativeOn(key) && isString(value)) {
13061
13073
  return false;
13062
13074
  }
13063
- if (key in el) {
13064
- return true;
13065
- }
13066
- if (el._isVueCE && (/[A-Z]/.test(key) || !isString(value))) {
13067
- return true;
13068
- }
13069
- return false;
13075
+ return key in el;
13070
13076
  }
13071
13077
 
13072
13078
  const REMOVAL = {};