@vue/compat 3.4.12 → 3.4.13

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.4.12
2
+ * @vue/compat v3.4.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -465,7 +465,7 @@ class ReactiveEffect {
465
465
  /**
466
466
  * @internal
467
467
  */
468
- this._dirtyLevel = 3;
468
+ this._dirtyLevel = 2;
469
469
  /**
470
470
  * @internal
471
471
  */
@@ -477,7 +477,7 @@ class ReactiveEffect {
477
477
  /**
478
478
  * @internal
479
479
  */
480
- this._queryings = 0;
480
+ this._shouldSchedule = false;
481
481
  /**
482
482
  * @internal
483
483
  */
@@ -486,10 +486,9 @@ class ReactiveEffect {
486
486
  }
487
487
  get dirty() {
488
488
  if (this._dirtyLevel === 1) {
489
- this._dirtyLevel = 0;
490
- this._queryings++;
491
489
  pauseTracking();
492
- for (const dep of this.deps) {
490
+ for (let i = 0; i < this._depsLength; i++) {
491
+ const dep = this.deps[i];
493
492
  if (dep.computed) {
494
493
  triggerComputed(dep.computed);
495
494
  if (this._dirtyLevel >= 2) {
@@ -497,13 +496,15 @@ class ReactiveEffect {
497
496
  }
498
497
  }
499
498
  }
499
+ if (this._dirtyLevel < 2) {
500
+ this._dirtyLevel = 0;
501
+ }
500
502
  resetTracking();
501
- this._queryings--;
502
503
  }
503
504
  return this._dirtyLevel >= 2;
504
505
  }
505
506
  set dirty(v) {
506
- this._dirtyLevel = v ? 3 : 0;
507
+ this._dirtyLevel = v ? 2 : 0;
507
508
  }
508
509
  run() {
509
510
  this._dirtyLevel = 0;
@@ -626,22 +627,24 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
626
627
  var _a;
627
628
  pauseScheduling();
628
629
  for (const effect2 of dep.keys()) {
629
- if (!effect2.allowRecurse && effect2._runnings) {
630
+ if (dep.get(effect2) !== effect2._trackId) {
630
631
  continue;
631
632
  }
632
- if (effect2._dirtyLevel < dirtyLevel && (!effect2._runnings || dirtyLevel !== 2)) {
633
+ if (effect2._dirtyLevel < dirtyLevel) {
633
634
  const lastDirtyLevel = effect2._dirtyLevel;
634
635
  effect2._dirtyLevel = dirtyLevel;
635
- if (lastDirtyLevel === 0 && (!effect2._queryings || dirtyLevel !== 2)) {
636
+ if (lastDirtyLevel === 0) {
637
+ effect2._shouldSchedule = true;
636
638
  if (!!(process.env.NODE_ENV !== "production")) {
637
639
  (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
638
640
  }
639
641
  effect2.trigger();
640
- if (effect2.scheduler) {
641
- queueEffectSchedulers.push(effect2.scheduler);
642
- }
643
642
  }
644
643
  }
644
+ if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {
645
+ effect2._shouldSchedule = false;
646
+ queueEffectSchedulers.push(effect2.scheduler);
647
+ }
645
648
  }
646
649
  resetScheduling();
647
650
  }
@@ -727,7 +730,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
727
730
  if (dep) {
728
731
  triggerEffects(
729
732
  dep,
730
- 3,
733
+ 2,
731
734
  !!(process.env.NODE_ENV !== "production") ? {
732
735
  target,
733
736
  type,
@@ -1334,12 +1337,12 @@ class ComputedRefImpl {
1334
1337
  }
1335
1338
  get value() {
1336
1339
  const self = toRaw(this);
1337
- trackRefValue(self);
1338
1340
  if (!self._cacheable || self.effect.dirty) {
1339
1341
  if (hasChanged(self._value, self._value = self.effect.run())) {
1340
1342
  triggerRefValue(self, 2);
1341
1343
  }
1342
1344
  }
1345
+ trackRefValue(self);
1343
1346
  return self._value;
1344
1347
  }
1345
1348
  set value(newValue) {
@@ -1392,7 +1395,7 @@ function trackRefValue(ref2) {
1392
1395
  );
1393
1396
  }
1394
1397
  }
1395
- function triggerRefValue(ref2, dirtyLevel = 3, newVal) {
1398
+ function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
1396
1399
  ref2 = toRaw(ref2);
1397
1400
  const dep = ref2.dep;
1398
1401
  if (dep) {
@@ -1441,12 +1444,12 @@ class RefImpl {
1441
1444
  if (hasChanged(newVal, this._rawValue)) {
1442
1445
  this._rawValue = newVal;
1443
1446
  this._value = useDirectValue ? newVal : toReactive(newVal);
1444
- triggerRefValue(this, 3, newVal);
1447
+ triggerRefValue(this, 2, newVal);
1445
1448
  }
1446
1449
  }
1447
1450
  }
1448
1451
  function triggerRef(ref2) {
1449
- triggerRefValue(ref2, 3, !!(process.env.NODE_ENV !== "production") ? ref2.value : void 0);
1452
+ triggerRefValue(ref2, 2, !!(process.env.NODE_ENV !== "production") ? ref2.value : void 0);
1450
1453
  }
1451
1454
  function unref(ref2) {
1452
1455
  return isRef(ref2) ? ref2.value : ref2;
@@ -6523,7 +6526,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6523
6526
  return vm;
6524
6527
  }
6525
6528
  }
6526
- Vue.version = `2.6.14-compat:${"3.4.12"}`;
6529
+ Vue.version = `2.6.14-compat:${"3.4.13"}`;
6527
6530
  Vue.config = singletonApp.config;
6528
6531
  Vue.use = (p, ...options) => {
6529
6532
  if (p && isFunction(p.install)) {
@@ -11422,7 +11425,7 @@ function isMemoSame(cached, memo) {
11422
11425
  return true;
11423
11426
  }
11424
11427
 
11425
- const version = "3.4.12";
11428
+ const version = "3.4.13";
11426
11429
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
11427
11430
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11428
11431
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.4.12
2
+ * @vue/compat v3.4.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -468,7 +468,7 @@ var Vue = (function () {
468
468
  /**
469
469
  * @internal
470
470
  */
471
- this._dirtyLevel = 3;
471
+ this._dirtyLevel = 2;
472
472
  /**
473
473
  * @internal
474
474
  */
@@ -480,7 +480,7 @@ var Vue = (function () {
480
480
  /**
481
481
  * @internal
482
482
  */
483
- this._queryings = 0;
483
+ this._shouldSchedule = false;
484
484
  /**
485
485
  * @internal
486
486
  */
@@ -489,10 +489,9 @@ var Vue = (function () {
489
489
  }
490
490
  get dirty() {
491
491
  if (this._dirtyLevel === 1) {
492
- this._dirtyLevel = 0;
493
- this._queryings++;
494
492
  pauseTracking();
495
- for (const dep of this.deps) {
493
+ for (let i = 0; i < this._depsLength; i++) {
494
+ const dep = this.deps[i];
496
495
  if (dep.computed) {
497
496
  triggerComputed(dep.computed);
498
497
  if (this._dirtyLevel >= 2) {
@@ -500,13 +499,15 @@ var Vue = (function () {
500
499
  }
501
500
  }
502
501
  }
502
+ if (this._dirtyLevel < 2) {
503
+ this._dirtyLevel = 0;
504
+ }
503
505
  resetTracking();
504
- this._queryings--;
505
506
  }
506
507
  return this._dirtyLevel >= 2;
507
508
  }
508
509
  set dirty(v) {
509
- this._dirtyLevel = v ? 3 : 0;
510
+ this._dirtyLevel = v ? 2 : 0;
510
511
  }
511
512
  run() {
512
513
  this._dirtyLevel = 0;
@@ -629,22 +630,24 @@ var Vue = (function () {
629
630
  var _a;
630
631
  pauseScheduling();
631
632
  for (const effect2 of dep.keys()) {
632
- if (!effect2.allowRecurse && effect2._runnings) {
633
+ if (dep.get(effect2) !== effect2._trackId) {
633
634
  continue;
634
635
  }
635
- if (effect2._dirtyLevel < dirtyLevel && (!effect2._runnings || dirtyLevel !== 2)) {
636
+ if (effect2._dirtyLevel < dirtyLevel) {
636
637
  const lastDirtyLevel = effect2._dirtyLevel;
637
638
  effect2._dirtyLevel = dirtyLevel;
638
- if (lastDirtyLevel === 0 && (!effect2._queryings || dirtyLevel !== 2)) {
639
+ if (lastDirtyLevel === 0) {
640
+ effect2._shouldSchedule = true;
639
641
  {
640
642
  (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
641
643
  }
642
644
  effect2.trigger();
643
- if (effect2.scheduler) {
644
- queueEffectSchedulers.push(effect2.scheduler);
645
- }
646
645
  }
647
646
  }
647
+ if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {
648
+ effect2._shouldSchedule = false;
649
+ queueEffectSchedulers.push(effect2.scheduler);
650
+ }
648
651
  }
649
652
  resetScheduling();
650
653
  }
@@ -730,7 +733,7 @@ var Vue = (function () {
730
733
  if (dep) {
731
734
  triggerEffects(
732
735
  dep,
733
- 3,
736
+ 2,
734
737
  {
735
738
  target,
736
739
  type,
@@ -1337,12 +1340,12 @@ var Vue = (function () {
1337
1340
  }
1338
1341
  get value() {
1339
1342
  const self = toRaw(this);
1340
- trackRefValue(self);
1341
1343
  if (!self._cacheable || self.effect.dirty) {
1342
1344
  if (hasChanged(self._value, self._value = self.effect.run())) {
1343
1345
  triggerRefValue(self, 2);
1344
1346
  }
1345
1347
  }
1348
+ trackRefValue(self);
1346
1349
  return self._value;
1347
1350
  }
1348
1351
  set value(newValue) {
@@ -1395,7 +1398,7 @@ var Vue = (function () {
1395
1398
  );
1396
1399
  }
1397
1400
  }
1398
- function triggerRefValue(ref2, dirtyLevel = 3, newVal) {
1401
+ function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
1399
1402
  ref2 = toRaw(ref2);
1400
1403
  const dep = ref2.dep;
1401
1404
  if (dep) {
@@ -1444,12 +1447,12 @@ var Vue = (function () {
1444
1447
  if (hasChanged(newVal, this._rawValue)) {
1445
1448
  this._rawValue = newVal;
1446
1449
  this._value = useDirectValue ? newVal : toReactive(newVal);
1447
- triggerRefValue(this, 3, newVal);
1450
+ triggerRefValue(this, 2, newVal);
1448
1451
  }
1449
1452
  }
1450
1453
  }
1451
1454
  function triggerRef(ref2) {
1452
- triggerRefValue(ref2, 3, ref2.value );
1455
+ triggerRefValue(ref2, 2, ref2.value );
1453
1456
  }
1454
1457
  function unref(ref2) {
1455
1458
  return isRef(ref2) ? ref2.value : ref2;
@@ -6482,7 +6485,7 @@ If this is a native custom element, make sure to exclude it from component resol
6482
6485
  return vm;
6483
6486
  }
6484
6487
  }
6485
- Vue.version = `2.6.14-compat:${"3.4.12"}`;
6488
+ Vue.version = `2.6.14-compat:${"3.4.13"}`;
6486
6489
  Vue.config = singletonApp.config;
6487
6490
  Vue.use = (p, ...options) => {
6488
6491
  if (p && isFunction(p.install)) {
@@ -11297,7 +11300,7 @@ Component that was made reactive: `,
11297
11300
  return true;
11298
11301
  }
11299
11302
 
11300
- const version = "3.4.12";
11303
+ const version = "3.4.13";
11301
11304
  const warn = warn$1 ;
11302
11305
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11303
11306
  const devtools = devtools$1 ;