@vue/compat 3.4.30 → 3.4.31

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.30
2
+ * @vue/compat v3.4.31
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -327,11 +327,14 @@ function looseIndexOf(arr, val) {
327
327
  return arr.findIndex((item) => looseEqual(item, val));
328
328
  }
329
329
 
330
+ const isRef$1 = (val) => {
331
+ return !!(val && val.__v_isRef === true);
332
+ };
330
333
  const toDisplayString = (val) => {
331
- return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
334
+ return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);
332
335
  };
333
336
  const replacer = (_key, val) => {
334
- if (val && val.__v_isRef) {
337
+ if (isRef$1(val)) {
335
338
  return replacer(_key, val.value);
336
339
  } else if (isMap(val)) {
337
340
  return {
@@ -478,7 +481,7 @@ class ReactiveEffect {
478
481
  /**
479
482
  * @internal
480
483
  */
481
- this._dirtyLevel = 5;
484
+ this._dirtyLevel = 4;
482
485
  /**
483
486
  * @internal
484
487
  */
@@ -498,20 +501,14 @@ class ReactiveEffect {
498
501
  recordEffectScope(this, scope);
499
502
  }
500
503
  get dirty() {
501
- if (this._dirtyLevel === 2)
502
- return false;
503
- if (this._dirtyLevel === 3 || this._dirtyLevel === 4) {
504
+ if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
504
505
  this._dirtyLevel = 1;
505
506
  pauseTracking();
506
507
  for (let i = 0; i < this._depsLength; i++) {
507
508
  const dep = this.deps[i];
508
509
  if (dep.computed) {
509
- if (dep.computed.effect._dirtyLevel === 2) {
510
- resetTracking();
511
- return true;
512
- }
513
510
  triggerComputed(dep.computed);
514
- if (this._dirtyLevel >= 5) {
511
+ if (this._dirtyLevel >= 4) {
515
512
  break;
516
513
  }
517
514
  }
@@ -521,10 +518,10 @@ class ReactiveEffect {
521
518
  }
522
519
  resetTracking();
523
520
  }
524
- return this._dirtyLevel >= 5;
521
+ return this._dirtyLevel >= 4;
525
522
  }
526
523
  set dirty(v) {
527
- this._dirtyLevel = v ? 5 : 0;
524
+ this._dirtyLevel = v ? 4 : 0;
528
525
  }
529
526
  run() {
530
527
  this._dirtyLevel = 0;
@@ -646,17 +643,8 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
646
643
  pauseScheduling();
647
644
  for (const effect2 of dep.keys()) {
648
645
  let tracking;
649
- if (!dep.computed && effect2.computed) {
650
- if (effect2._runnings > 0 && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
651
- effect2._dirtyLevel = 2;
652
- continue;
653
- }
654
- }
655
646
  if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
656
647
  effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
657
- if (effect2.computed && effect2._dirtyLevel === 2) {
658
- effect2._shouldSchedule = true;
659
- }
660
648
  effect2._dirtyLevel = dirtyLevel;
661
649
  }
662
650
  if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
@@ -664,7 +652,7 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
664
652
  (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
665
653
  }
666
654
  effect2.trigger();
667
- if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 3) {
655
+ if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
668
656
  effect2._shouldSchedule = false;
669
657
  if (effect2.scheduler) {
670
658
  queueEffectSchedulers.push(effect2.scheduler);
@@ -756,7 +744,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
756
744
  if (dep) {
757
745
  triggerEffects(
758
746
  dep,
759
- 5,
747
+ 4,
760
748
  !!(process.env.NODE_ENV !== "production") ? {
761
749
  target,
762
750
  type,
@@ -1359,7 +1347,7 @@ class ComputedRefImpl {
1359
1347
  () => getter(this._value),
1360
1348
  () => triggerRefValue(
1361
1349
  this,
1362
- this.effect._dirtyLevel === 3 ? 3 : 4
1350
+ this.effect._dirtyLevel === 2 ? 2 : 3
1363
1351
  )
1364
1352
  );
1365
1353
  this.effect.computed = this;
@@ -1368,11 +1356,8 @@ class ComputedRefImpl {
1368
1356
  }
1369
1357
  get value() {
1370
1358
  const self = toRaw(this);
1371
- const lastDirtyLevel = self.effect._dirtyLevel;
1372
1359
  if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
1373
- if (lastDirtyLevel !== 3) {
1374
- triggerRefValue(self, 5);
1375
- }
1360
+ triggerRefValue(self, 4);
1376
1361
  }
1377
1362
  trackRefValue(self);
1378
1363
  if (self.effect._dirtyLevel >= 2) {
@@ -1381,7 +1366,7 @@ class ComputedRefImpl {
1381
1366
 
1382
1367
  getter: `, this.getter);
1383
1368
  }
1384
- triggerRefValue(self, 3);
1369
+ triggerRefValue(self, 2);
1385
1370
  }
1386
1371
  return self._value;
1387
1372
  }
@@ -1436,7 +1421,7 @@ function trackRefValue(ref2) {
1436
1421
  );
1437
1422
  }
1438
1423
  }
1439
- function triggerRefValue(ref2, dirtyLevel = 5, newVal, oldVal) {
1424
+ function triggerRefValue(ref2, dirtyLevel = 4, newVal, oldVal) {
1440
1425
  ref2 = toRaw(ref2);
1441
1426
  const dep = ref2.dep;
1442
1427
  if (dep) {
@@ -1487,12 +1472,12 @@ class RefImpl {
1487
1472
  const oldVal = this._rawValue;
1488
1473
  this._rawValue = newVal;
1489
1474
  this._value = useDirectValue ? newVal : toReactive(newVal);
1490
- triggerRefValue(this, 5, newVal, oldVal);
1475
+ triggerRefValue(this, 4, newVal, oldVal);
1491
1476
  }
1492
1477
  }
1493
1478
  }
1494
1479
  function triggerRef(ref2) {
1495
- triggerRefValue(ref2, 5, !!(process.env.NODE_ENV !== "production") ? ref2.value : void 0);
1480
+ triggerRefValue(ref2, 4, !!(process.env.NODE_ENV !== "production") ? ref2.value : void 0);
1496
1481
  }
1497
1482
  function unref(ref2) {
1498
1483
  return isRef(ref2) ? ref2.value : ref2;
@@ -5702,7 +5687,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5702
5687
  return vm;
5703
5688
  }
5704
5689
  }
5705
- Vue.version = `2.6.14-compat:${"3.4.30"}`;
5690
+ Vue.version = `2.6.14-compat:${"3.4.31"}`;
5706
5691
  Vue.config = singletonApp.config;
5707
5692
  Vue.use = (plugin, ...options) => {
5708
5693
  if (plugin && isFunction(plugin.install)) {
@@ -11518,7 +11503,7 @@ function isMemoSame(cached, memo) {
11518
11503
  return true;
11519
11504
  }
11520
11505
 
11521
- const version = "3.4.30";
11506
+ const version = "3.4.31";
11522
11507
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
11523
11508
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11524
11509
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.4.30
2
+ * @vue/compat v3.4.31
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -330,11 +330,14 @@ var Vue = (function () {
330
330
  return arr.findIndex((item) => looseEqual(item, val));
331
331
  }
332
332
 
333
+ const isRef$1 = (val) => {
334
+ return !!(val && val.__v_isRef === true);
335
+ };
333
336
  const toDisplayString = (val) => {
334
- return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
337
+ return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);
335
338
  };
336
339
  const replacer = (_key, val) => {
337
- if (val && val.__v_isRef) {
340
+ if (isRef$1(val)) {
338
341
  return replacer(_key, val.value);
339
342
  } else if (isMap(val)) {
340
343
  return {
@@ -481,7 +484,7 @@ var Vue = (function () {
481
484
  /**
482
485
  * @internal
483
486
  */
484
- this._dirtyLevel = 5;
487
+ this._dirtyLevel = 4;
485
488
  /**
486
489
  * @internal
487
490
  */
@@ -501,20 +504,14 @@ var Vue = (function () {
501
504
  recordEffectScope(this, scope);
502
505
  }
503
506
  get dirty() {
504
- if (this._dirtyLevel === 2)
505
- return false;
506
- if (this._dirtyLevel === 3 || this._dirtyLevel === 4) {
507
+ if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
507
508
  this._dirtyLevel = 1;
508
509
  pauseTracking();
509
510
  for (let i = 0; i < this._depsLength; i++) {
510
511
  const dep = this.deps[i];
511
512
  if (dep.computed) {
512
- if (dep.computed.effect._dirtyLevel === 2) {
513
- resetTracking();
514
- return true;
515
- }
516
513
  triggerComputed(dep.computed);
517
- if (this._dirtyLevel >= 5) {
514
+ if (this._dirtyLevel >= 4) {
518
515
  break;
519
516
  }
520
517
  }
@@ -524,10 +521,10 @@ var Vue = (function () {
524
521
  }
525
522
  resetTracking();
526
523
  }
527
- return this._dirtyLevel >= 5;
524
+ return this._dirtyLevel >= 4;
528
525
  }
529
526
  set dirty(v) {
530
- this._dirtyLevel = v ? 5 : 0;
527
+ this._dirtyLevel = v ? 4 : 0;
531
528
  }
532
529
  run() {
533
530
  this._dirtyLevel = 0;
@@ -649,17 +646,8 @@ var Vue = (function () {
649
646
  pauseScheduling();
650
647
  for (const effect2 of dep.keys()) {
651
648
  let tracking;
652
- if (!dep.computed && effect2.computed) {
653
- if (effect2._runnings > 0 && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
654
- effect2._dirtyLevel = 2;
655
- continue;
656
- }
657
- }
658
649
  if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
659
650
  effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
660
- if (effect2.computed && effect2._dirtyLevel === 2) {
661
- effect2._shouldSchedule = true;
662
- }
663
651
  effect2._dirtyLevel = dirtyLevel;
664
652
  }
665
653
  if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
@@ -667,7 +655,7 @@ var Vue = (function () {
667
655
  (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
668
656
  }
669
657
  effect2.trigger();
670
- if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 3) {
658
+ if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
671
659
  effect2._shouldSchedule = false;
672
660
  if (effect2.scheduler) {
673
661
  queueEffectSchedulers.push(effect2.scheduler);
@@ -759,7 +747,7 @@ var Vue = (function () {
759
747
  if (dep) {
760
748
  triggerEffects(
761
749
  dep,
762
- 5,
750
+ 4,
763
751
  {
764
752
  target,
765
753
  type,
@@ -1362,7 +1350,7 @@ var Vue = (function () {
1362
1350
  () => getter(this._value),
1363
1351
  () => triggerRefValue(
1364
1352
  this,
1365
- this.effect._dirtyLevel === 3 ? 3 : 4
1353
+ this.effect._dirtyLevel === 2 ? 2 : 3
1366
1354
  )
1367
1355
  );
1368
1356
  this.effect.computed = this;
@@ -1371,11 +1359,8 @@ var Vue = (function () {
1371
1359
  }
1372
1360
  get value() {
1373
1361
  const self = toRaw(this);
1374
- const lastDirtyLevel = self.effect._dirtyLevel;
1375
1362
  if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
1376
- if (lastDirtyLevel !== 3) {
1377
- triggerRefValue(self, 5);
1378
- }
1363
+ triggerRefValue(self, 4);
1379
1364
  }
1380
1365
  trackRefValue(self);
1381
1366
  if (self.effect._dirtyLevel >= 2) {
@@ -1384,7 +1369,7 @@ var Vue = (function () {
1384
1369
 
1385
1370
  getter: `, this.getter);
1386
1371
  }
1387
- triggerRefValue(self, 3);
1372
+ triggerRefValue(self, 2);
1388
1373
  }
1389
1374
  return self._value;
1390
1375
  }
@@ -1439,7 +1424,7 @@ getter: `, this.getter);
1439
1424
  );
1440
1425
  }
1441
1426
  }
1442
- function triggerRefValue(ref2, dirtyLevel = 5, newVal, oldVal) {
1427
+ function triggerRefValue(ref2, dirtyLevel = 4, newVal, oldVal) {
1443
1428
  ref2 = toRaw(ref2);
1444
1429
  const dep = ref2.dep;
1445
1430
  if (dep) {
@@ -1490,12 +1475,12 @@ getter: `, this.getter);
1490
1475
  const oldVal = this._rawValue;
1491
1476
  this._rawValue = newVal;
1492
1477
  this._value = useDirectValue ? newVal : toReactive(newVal);
1493
- triggerRefValue(this, 5, newVal, oldVal);
1478
+ triggerRefValue(this, 4, newVal, oldVal);
1494
1479
  }
1495
1480
  }
1496
1481
  }
1497
1482
  function triggerRef(ref2) {
1498
- triggerRefValue(ref2, 5, ref2.value );
1483
+ triggerRefValue(ref2, 4, ref2.value );
1499
1484
  }
1500
1485
  function unref(ref2) {
1501
1486
  return isRef(ref2) ? ref2.value : ref2;
@@ -5697,7 +5682,7 @@ If this is a native custom element, make sure to exclude it from component resol
5697
5682
  return vm;
5698
5683
  }
5699
5684
  }
5700
- Vue.version = `2.6.14-compat:${"3.4.30"}`;
5685
+ Vue.version = `2.6.14-compat:${"3.4.31"}`;
5701
5686
  Vue.config = singletonApp.config;
5702
5687
  Vue.use = (plugin, ...options) => {
5703
5688
  if (plugin && isFunction(plugin.install)) {
@@ -11402,7 +11387,7 @@ Component that was made reactive: `,
11402
11387
  return true;
11403
11388
  }
11404
11389
 
11405
- const version = "3.4.30";
11390
+ const version = "3.4.31";
11406
11391
  const warn = warn$1 ;
11407
11392
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11408
11393
  const devtools = devtools$1 ;