@vue/compat 3.4.12 → 3.4.14

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/compat v3.4.12
2
+ * @vue/compat v3.4.14
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -516,7 +516,7 @@ class ReactiveEffect {
516
516
  /**
517
517
  * @internal
518
518
  */
519
- this._dirtyLevel = 3;
519
+ this._dirtyLevel = 2;
520
520
  /**
521
521
  * @internal
522
522
  */
@@ -528,7 +528,7 @@ class ReactiveEffect {
528
528
  /**
529
529
  * @internal
530
530
  */
531
- this._queryings = 0;
531
+ this._shouldSchedule = false;
532
532
  /**
533
533
  * @internal
534
534
  */
@@ -537,10 +537,9 @@ class ReactiveEffect {
537
537
  }
538
538
  get dirty() {
539
539
  if (this._dirtyLevel === 1) {
540
- this._dirtyLevel = 0;
541
- this._queryings++;
542
540
  pauseTracking();
543
- for (const dep of this.deps) {
541
+ for (let i = 0; i < this._depsLength; i++) {
542
+ const dep = this.deps[i];
544
543
  if (dep.computed) {
545
544
  triggerComputed(dep.computed);
546
545
  if (this._dirtyLevel >= 2) {
@@ -548,13 +547,15 @@ class ReactiveEffect {
548
547
  }
549
548
  }
550
549
  }
550
+ if (this._dirtyLevel < 2) {
551
+ this._dirtyLevel = 0;
552
+ }
551
553
  resetTracking();
552
- this._queryings--;
553
554
  }
554
555
  return this._dirtyLevel >= 2;
555
556
  }
556
557
  set dirty(v) {
557
- this._dirtyLevel = v ? 3 : 0;
558
+ this._dirtyLevel = v ? 2 : 0;
558
559
  }
559
560
  run() {
560
561
  this._dirtyLevel = 0;
@@ -677,22 +678,24 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
677
678
  var _a;
678
679
  pauseScheduling();
679
680
  for (const effect2 of dep.keys()) {
680
- if (!effect2.allowRecurse && effect2._runnings) {
681
+ if (dep.get(effect2) !== effect2._trackId) {
681
682
  continue;
682
683
  }
683
- if (effect2._dirtyLevel < dirtyLevel && (!effect2._runnings || dirtyLevel !== 2)) {
684
+ if (effect2._dirtyLevel < dirtyLevel && !(effect2._runnings && !effect2.allowRecurse)) {
684
685
  const lastDirtyLevel = effect2._dirtyLevel;
685
686
  effect2._dirtyLevel = dirtyLevel;
686
- if (lastDirtyLevel === 0 && (!effect2._queryings || dirtyLevel !== 2)) {
687
+ if (lastDirtyLevel === 0) {
688
+ effect2._shouldSchedule = true;
687
689
  {
688
690
  (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
689
691
  }
690
692
  effect2.trigger();
691
- if (effect2.scheduler) {
692
- queueEffectSchedulers.push(effect2.scheduler);
693
- }
694
693
  }
695
694
  }
695
+ if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {
696
+ effect2._shouldSchedule = false;
697
+ queueEffectSchedulers.push(effect2.scheduler);
698
+ }
696
699
  }
697
700
  resetScheduling();
698
701
  }
@@ -778,7 +781,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
778
781
  if (dep) {
779
782
  triggerEffects(
780
783
  dep,
781
- 3,
784
+ 2,
782
785
  {
783
786
  target,
784
787
  type,
@@ -1385,12 +1388,12 @@ class ComputedRefImpl {
1385
1388
  }
1386
1389
  get value() {
1387
1390
  const self = toRaw(this);
1388
- trackRefValue(self);
1389
1391
  if (!self._cacheable || self.effect.dirty) {
1390
1392
  if (hasChanged(self._value, self._value = self.effect.run())) {
1391
1393
  triggerRefValue(self, 2);
1392
1394
  }
1393
1395
  }
1396
+ trackRefValue(self);
1394
1397
  return self._value;
1395
1398
  }
1396
1399
  set value(newValue) {
@@ -1443,7 +1446,7 @@ function trackRefValue(ref2) {
1443
1446
  );
1444
1447
  }
1445
1448
  }
1446
- function triggerRefValue(ref2, dirtyLevel = 3, newVal) {
1449
+ function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
1447
1450
  ref2 = toRaw(ref2);
1448
1451
  const dep = ref2.dep;
1449
1452
  if (dep) {
@@ -1492,12 +1495,12 @@ class RefImpl {
1492
1495
  if (hasChanged(newVal, this._rawValue)) {
1493
1496
  this._rawValue = newVal;
1494
1497
  this._value = useDirectValue ? newVal : toReactive(newVal);
1495
- triggerRefValue(this, 3, newVal);
1498
+ triggerRefValue(this, 2, newVal);
1496
1499
  }
1497
1500
  }
1498
1501
  }
1499
1502
  function triggerRef(ref2) {
1500
- triggerRefValue(ref2, 3, ref2.value );
1503
+ triggerRefValue(ref2, 2, ref2.value );
1501
1504
  }
1502
1505
  function unref(ref2) {
1503
1506
  return isRef(ref2) ? ref2.value : ref2;
@@ -6563,7 +6566,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6563
6566
  return vm;
6564
6567
  }
6565
6568
  }
6566
- Vue.version = `2.6.14-compat:${"3.4.12"}`;
6569
+ Vue.version = `2.6.14-compat:${"3.4.14"}`;
6567
6570
  Vue.config = singletonApp.config;
6568
6571
  Vue.use = (p, ...options) => {
6569
6572
  if (p && isFunction(p.install)) {
@@ -11395,7 +11398,7 @@ function isMemoSame(cached, memo) {
11395
11398
  return true;
11396
11399
  }
11397
11400
 
11398
- const version = "3.4.12";
11401
+ const version = "3.4.14";
11399
11402
  const warn = warn$1 ;
11400
11403
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11401
11404
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.4.12
2
+ * @vue/compat v3.4.14
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -443,7 +443,7 @@ class ReactiveEffect {
443
443
  /**
444
444
  * @internal
445
445
  */
446
- this._dirtyLevel = 3;
446
+ this._dirtyLevel = 2;
447
447
  /**
448
448
  * @internal
449
449
  */
@@ -455,7 +455,7 @@ class ReactiveEffect {
455
455
  /**
456
456
  * @internal
457
457
  */
458
- this._queryings = 0;
458
+ this._shouldSchedule = false;
459
459
  /**
460
460
  * @internal
461
461
  */
@@ -464,10 +464,9 @@ class ReactiveEffect {
464
464
  }
465
465
  get dirty() {
466
466
  if (this._dirtyLevel === 1) {
467
- this._dirtyLevel = 0;
468
- this._queryings++;
469
467
  pauseTracking();
470
- for (const dep of this.deps) {
468
+ for (let i = 0; i < this._depsLength; i++) {
469
+ const dep = this.deps[i];
471
470
  if (dep.computed) {
472
471
  triggerComputed(dep.computed);
473
472
  if (this._dirtyLevel >= 2) {
@@ -475,13 +474,15 @@ class ReactiveEffect {
475
474
  }
476
475
  }
477
476
  }
477
+ if (this._dirtyLevel < 2) {
478
+ this._dirtyLevel = 0;
479
+ }
478
480
  resetTracking();
479
- this._queryings--;
480
481
  }
481
482
  return this._dirtyLevel >= 2;
482
483
  }
483
484
  set dirty(v) {
484
- this._dirtyLevel = v ? 3 : 0;
485
+ this._dirtyLevel = v ? 2 : 0;
485
486
  }
486
487
  run() {
487
488
  this._dirtyLevel = 0;
@@ -599,19 +600,21 @@ const queueEffectSchedulers = [];
599
600
  function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
600
601
  pauseScheduling();
601
602
  for (const effect2 of dep.keys()) {
602
- if (!effect2.allowRecurse && effect2._runnings) {
603
+ if (dep.get(effect2) !== effect2._trackId) {
603
604
  continue;
604
605
  }
605
- if (effect2._dirtyLevel < dirtyLevel && (!effect2._runnings || dirtyLevel !== 2)) {
606
+ if (effect2._dirtyLevel < dirtyLevel && !(effect2._runnings && !effect2.allowRecurse)) {
606
607
  const lastDirtyLevel = effect2._dirtyLevel;
607
608
  effect2._dirtyLevel = dirtyLevel;
608
- if (lastDirtyLevel === 0 && (!effect2._queryings || dirtyLevel !== 2)) {
609
+ if (lastDirtyLevel === 0) {
610
+ effect2._shouldSchedule = true;
609
611
  effect2.trigger();
610
- if (effect2.scheduler) {
611
- queueEffectSchedulers.push(effect2.scheduler);
612
- }
613
612
  }
614
613
  }
614
+ if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {
615
+ effect2._shouldSchedule = false;
616
+ queueEffectSchedulers.push(effect2.scheduler);
617
+ }
615
618
  }
616
619
  resetScheduling();
617
620
  }
@@ -691,7 +694,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
691
694
  if (dep) {
692
695
  triggerEffects(
693
696
  dep,
694
- 3);
697
+ 2);
695
698
  }
696
699
  }
697
700
  resetScheduling();
@@ -1253,12 +1256,12 @@ class ComputedRefImpl {
1253
1256
  }
1254
1257
  get value() {
1255
1258
  const self = toRaw(this);
1256
- trackRefValue(self);
1257
1259
  if (!self._cacheable || self.effect.dirty) {
1258
1260
  if (hasChanged(self._value, self._value = self.effect.run())) {
1259
1261
  triggerRefValue(self, 2);
1260
1262
  }
1261
1263
  }
1264
+ trackRefValue(self);
1262
1265
  return self._value;
1263
1266
  }
1264
1267
  set value(newValue) {
@@ -1299,7 +1302,7 @@ function trackRefValue(ref2) {
1299
1302
  )));
1300
1303
  }
1301
1304
  }
1302
- function triggerRefValue(ref2, dirtyLevel = 3, newVal) {
1305
+ function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
1303
1306
  ref2 = toRaw(ref2);
1304
1307
  const dep = ref2.dep;
1305
1308
  if (dep) {
@@ -1341,12 +1344,12 @@ class RefImpl {
1341
1344
  if (hasChanged(newVal, this._rawValue)) {
1342
1345
  this._rawValue = newVal;
1343
1346
  this._value = useDirectValue ? newVal : toReactive(newVal);
1344
- triggerRefValue(this, 3);
1347
+ triggerRefValue(this, 2);
1345
1348
  }
1346
1349
  }
1347
1350
  }
1348
1351
  function triggerRef(ref2) {
1349
- triggerRefValue(ref2, 3);
1352
+ triggerRefValue(ref2, 2);
1350
1353
  }
1351
1354
  function unref(ref2) {
1352
1355
  return isRef(ref2) ? ref2.value : ref2;
@@ -5247,7 +5250,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5247
5250
  return vm;
5248
5251
  }
5249
5252
  }
5250
- Vue.version = `2.6.14-compat:${"3.4.12"}`;
5253
+ Vue.version = `2.6.14-compat:${"3.4.14"}`;
5251
5254
  Vue.config = singletonApp.config;
5252
5255
  Vue.use = (p, ...options) => {
5253
5256
  if (p && isFunction(p.install)) {
@@ -9106,7 +9109,7 @@ function isMemoSame(cached, memo) {
9106
9109
  return true;
9107
9110
  }
9108
9111
 
9109
- const version = "3.4.12";
9112
+ const version = "3.4.14";
9110
9113
  const warn$1 = NOOP;
9111
9114
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9112
9115
  const devtools = void 0;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.4.12
2
+ * @vue/compat v3.4.14
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 && !(effect2._runnings && !effect2.allowRecurse)) {
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
  {
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
  {
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, ref2.value );
1452
+ triggerRefValue(ref2, 2, ref2.value );
1450
1453
  }
1451
1454
  function unref(ref2) {
1452
1455
  return isRef(ref2) ? ref2.value : ref2;
@@ -6485,7 +6488,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6485
6488
  return vm;
6486
6489
  }
6487
6490
  }
6488
- Vue.version = `2.6.14-compat:${"3.4.12"}`;
6491
+ Vue.version = `2.6.14-compat:${"3.4.14"}`;
6489
6492
  Vue.config = singletonApp.config;
6490
6493
  Vue.use = (p, ...options) => {
6491
6494
  if (p && isFunction(p.install)) {
@@ -11300,7 +11303,7 @@ function isMemoSame(cached, memo) {
11300
11303
  return true;
11301
11304
  }
11302
11305
 
11303
- const version = "3.4.12";
11306
+ const version = "3.4.14";
11304
11307
  const warn = warn$1 ;
11305
11308
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11306
11309
  const devtools = devtools$1 ;