@vue/compat 3.5.5 → 3.5.6

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.5
2
+ * @vue/compat v3.5.6
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -532,7 +532,7 @@ class ReactiveEffect {
532
532
  /**
533
533
  * @internal
534
534
  */
535
- this.nextEffect = void 0;
535
+ this.next = void 0;
536
536
  /**
537
537
  * @internal
538
538
  */
@@ -562,9 +562,7 @@ class ReactiveEffect {
562
562
  return;
563
563
  }
564
564
  if (!(this.flags & 8)) {
565
- this.flags |= 8;
566
- this.nextEffect = batchedEffect;
567
- batchedEffect = this;
565
+ batch(this);
568
566
  }
569
567
  }
570
568
  run() {
@@ -625,7 +623,12 @@ class ReactiveEffect {
625
623
  }
626
624
  }
627
625
  let batchDepth = 0;
628
- let batchedEffect;
626
+ let batchedSub;
627
+ function batch(sub) {
628
+ sub.flags |= 8;
629
+ sub.next = batchedSub;
630
+ batchedSub = sub;
631
+ }
629
632
  function startBatch() {
630
633
  batchDepth++;
631
634
  }
@@ -634,15 +637,16 @@ function endBatch() {
634
637
  return;
635
638
  }
636
639
  let error;
637
- while (batchedEffect) {
638
- let e = batchedEffect;
639
- batchedEffect = void 0;
640
+ while (batchedSub) {
641
+ let e = batchedSub;
642
+ batchedSub = void 0;
640
643
  while (e) {
641
- const next = e.nextEffect;
642
- e.nextEffect = void 0;
644
+ const next = e.next;
645
+ e.next = void 0;
643
646
  e.flags &= ~8;
644
647
  if (e.flags & 1) {
645
648
  try {
649
+ ;
646
650
  e.trigger();
647
651
  } catch (err) {
648
652
  if (!error) error = err;
@@ -682,7 +686,7 @@ function cleanupDeps(sub) {
682
686
  }
683
687
  function isDirty(sub) {
684
688
  for (let link = sub.deps; link; link = link.nextDep) {
685
- if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed) || link.dep.version !== link.version) {
689
+ if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {
686
690
  return true;
687
691
  }
688
692
  }
@@ -702,7 +706,7 @@ function refreshComputed(computed) {
702
706
  computed.globalVersion = globalVersion;
703
707
  const dep = computed.dep;
704
708
  computed.flags |= 2;
705
- if (dep.version > 0 && !computed.isSSR && !isDirty(computed)) {
709
+ if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
706
710
  computed.flags &= ~2;
707
711
  return;
708
712
  }
@@ -884,7 +888,7 @@ class Dep {
884
888
  try {
885
889
  if (!!(process.env.NODE_ENV !== "production")) {
886
890
  for (let head = this.subsHead; head; head = head.nextSub) {
887
- if (!!(process.env.NODE_ENV !== "production") && head.sub.onTrigger && !(head.sub.flags & 8)) {
891
+ if (head.sub.onTrigger && !(head.sub.flags & 8)) {
888
892
  head.sub.onTrigger(
889
893
  extend(
890
894
  {
@@ -897,7 +901,10 @@ class Dep {
897
901
  }
898
902
  }
899
903
  for (let link = this.subs; link; link = link.prevSub) {
900
- link.sub.notify();
904
+ if (link.sub.notify()) {
905
+ ;
906
+ link.sub.dep.notify();
907
+ }
901
908
  }
902
909
  } finally {
903
910
  endBatch();
@@ -1976,8 +1983,10 @@ class ComputedRefImpl {
1976
1983
  */
1977
1984
  notify() {
1978
1985
  this.flags |= 16;
1979
- if (activeSub !== this) {
1980
- this.dep.notify();
1986
+ if (!(this.flags & 8) && // avoid infinite self recursion
1987
+ activeSub !== this) {
1988
+ batch(this);
1989
+ return true;
1981
1990
  } else if (!!(process.env.NODE_ENV !== "production")) ;
1982
1991
  }
1983
1992
  get value() {
@@ -2125,20 +2134,12 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2125
2134
  remove(scope.effects, effect);
2126
2135
  }
2127
2136
  };
2128
- if (once) {
2129
- if (cb) {
2130
- const _cb = cb;
2131
- cb = (...args) => {
2132
- _cb(...args);
2133
- watchHandle();
2134
- };
2135
- } else {
2136
- const _getter = getter;
2137
- getter = () => {
2138
- _getter();
2139
- watchHandle();
2140
- };
2141
- }
2137
+ if (once && cb) {
2138
+ const _cb = cb;
2139
+ cb = (...args) => {
2140
+ _cb(...args);
2141
+ watchHandle();
2142
+ };
2142
2143
  }
2143
2144
  let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
2144
2145
  const job = (immediateFirstRun) => {
@@ -7142,7 +7143,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7142
7143
  return vm;
7143
7144
  }
7144
7145
  }
7145
- Vue.version = `2.6.14-compat:${"3.5.5"}`;
7146
+ Vue.version = `2.6.14-compat:${"3.5.6"}`;
7146
7147
  Vue.config = singletonApp.config;
7147
7148
  Vue.use = (plugin, ...options) => {
7148
7149
  if (plugin && isFunction(plugin.install)) {
@@ -10000,11 +10001,12 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
10000
10001
  } else if (!cb || immediate) {
10001
10002
  baseWatchOptions.once = true;
10002
10003
  } else {
10003
- return {
10004
- stop: NOOP,
10005
- resume: NOOP,
10006
- pause: NOOP
10004
+ const watchStopHandle = () => {
10007
10005
  };
10006
+ watchStopHandle.stop = NOOP;
10007
+ watchStopHandle.resume = NOOP;
10008
+ watchStopHandle.pause = NOOP;
10009
+ return watchStopHandle;
10008
10010
  }
10009
10011
  }
10010
10012
  const instance = currentInstance;
@@ -12310,7 +12312,7 @@ function isMemoSame(cached, memo) {
12310
12312
  return true;
12311
12313
  }
12312
12314
 
12313
- const version = "3.5.5";
12315
+ const version = "3.5.6";
12314
12316
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
12315
12317
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12316
12318
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.5
2
+ * @vue/compat v3.5.6
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -535,7 +535,7 @@ var Vue = (function () {
535
535
  /**
536
536
  * @internal
537
537
  */
538
- this.nextEffect = void 0;
538
+ this.next = void 0;
539
539
  /**
540
540
  * @internal
541
541
  */
@@ -565,9 +565,7 @@ var Vue = (function () {
565
565
  return;
566
566
  }
567
567
  if (!(this.flags & 8)) {
568
- this.flags |= 8;
569
- this.nextEffect = batchedEffect;
570
- batchedEffect = this;
568
+ batch(this);
571
569
  }
572
570
  }
573
571
  run() {
@@ -628,7 +626,12 @@ var Vue = (function () {
628
626
  }
629
627
  }
630
628
  let batchDepth = 0;
631
- let batchedEffect;
629
+ let batchedSub;
630
+ function batch(sub) {
631
+ sub.flags |= 8;
632
+ sub.next = batchedSub;
633
+ batchedSub = sub;
634
+ }
632
635
  function startBatch() {
633
636
  batchDepth++;
634
637
  }
@@ -637,15 +640,16 @@ var Vue = (function () {
637
640
  return;
638
641
  }
639
642
  let error;
640
- while (batchedEffect) {
641
- let e = batchedEffect;
642
- batchedEffect = void 0;
643
+ while (batchedSub) {
644
+ let e = batchedSub;
645
+ batchedSub = void 0;
643
646
  while (e) {
644
- const next = e.nextEffect;
645
- e.nextEffect = void 0;
647
+ const next = e.next;
648
+ e.next = void 0;
646
649
  e.flags &= ~8;
647
650
  if (e.flags & 1) {
648
651
  try {
652
+ ;
649
653
  e.trigger();
650
654
  } catch (err) {
651
655
  if (!error) error = err;
@@ -685,7 +689,7 @@ var Vue = (function () {
685
689
  }
686
690
  function isDirty(sub) {
687
691
  for (let link = sub.deps; link; link = link.nextDep) {
688
- if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed) || link.dep.version !== link.version) {
692
+ if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {
689
693
  return true;
690
694
  }
691
695
  }
@@ -705,7 +709,7 @@ var Vue = (function () {
705
709
  computed.globalVersion = globalVersion;
706
710
  const dep = computed.dep;
707
711
  computed.flags |= 2;
708
- if (dep.version > 0 && !computed.isSSR && !isDirty(computed)) {
712
+ if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
709
713
  computed.flags &= ~2;
710
714
  return;
711
715
  }
@@ -900,7 +904,10 @@ var Vue = (function () {
900
904
  }
901
905
  }
902
906
  for (let link = this.subs; link; link = link.prevSub) {
903
- link.sub.notify();
907
+ if (link.sub.notify()) {
908
+ ;
909
+ link.sub.dep.notify();
910
+ }
904
911
  }
905
912
  } finally {
906
913
  endBatch();
@@ -1969,8 +1976,10 @@ var Vue = (function () {
1969
1976
  */
1970
1977
  notify() {
1971
1978
  this.flags |= 16;
1972
- if (activeSub !== this) {
1973
- this.dep.notify();
1979
+ if (!(this.flags & 8) && // avoid infinite self recursion
1980
+ activeSub !== this) {
1981
+ batch(this);
1982
+ return true;
1974
1983
  }
1975
1984
  }
1976
1985
  get value() {
@@ -2118,20 +2127,12 @@ var Vue = (function () {
2118
2127
  remove(scope.effects, effect);
2119
2128
  }
2120
2129
  };
2121
- if (once) {
2122
- if (cb) {
2123
- const _cb = cb;
2124
- cb = (...args) => {
2125
- _cb(...args);
2126
- watchHandle();
2127
- };
2128
- } else {
2129
- const _getter = getter;
2130
- getter = () => {
2131
- _getter();
2132
- watchHandle();
2133
- };
2134
- }
2130
+ if (once && cb) {
2131
+ const _cb = cb;
2132
+ cb = (...args) => {
2133
+ _cb(...args);
2134
+ watchHandle();
2135
+ };
2135
2136
  }
2136
2137
  let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
2137
2138
  const job = (immediateFirstRun) => {
@@ -7104,7 +7105,7 @@ If this is a native custom element, make sure to exclude it from component resol
7104
7105
  return vm;
7105
7106
  }
7106
7107
  }
7107
- Vue.version = `2.6.14-compat:${"3.5.5"}`;
7108
+ Vue.version = `2.6.14-compat:${"3.5.6"}`;
7108
7109
  Vue.config = singletonApp.config;
7109
7110
  Vue.use = (plugin, ...options) => {
7110
7111
  if (plugin && isFunction(plugin.install)) {
@@ -12182,7 +12183,7 @@ Component that was made reactive: `,
12182
12183
  return true;
12183
12184
  }
12184
12185
 
12185
- const version = "3.5.5";
12186
+ const version = "3.5.6";
12186
12187
  const warn = warn$1 ;
12187
12188
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12188
12189
  const devtools = devtools$1 ;