@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
  **/
@@ -260,11 +260,14 @@ function looseIndexOf(arr, val) {
260
260
  return arr.findIndex((item) => looseEqual(item, val));
261
261
  }
262
262
 
263
+ const isRef$1 = (val) => {
264
+ return !!(val && val.__v_isRef === true);
265
+ };
263
266
  const toDisplayString = (val) => {
264
- return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
267
+ 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);
265
268
  };
266
269
  const replacer = (_key, val) => {
267
- if (val && val.__v_isRef) {
270
+ if (isRef$1(val)) {
268
271
  return replacer(_key, val.value);
269
272
  } else if (isMap(val)) {
270
273
  return {
@@ -411,7 +414,7 @@ class ReactiveEffect {
411
414
  /**
412
415
  * @internal
413
416
  */
414
- this._dirtyLevel = 5;
417
+ this._dirtyLevel = 4;
415
418
  /**
416
419
  * @internal
417
420
  */
@@ -431,20 +434,14 @@ class ReactiveEffect {
431
434
  recordEffectScope(this, scope);
432
435
  }
433
436
  get dirty() {
434
- if (this._dirtyLevel === 2)
435
- return false;
436
- if (this._dirtyLevel === 3 || this._dirtyLevel === 4) {
437
+ if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
437
438
  this._dirtyLevel = 1;
438
439
  pauseTracking();
439
440
  for (let i = 0; i < this._depsLength; i++) {
440
441
  const dep = this.deps[i];
441
442
  if (dep.computed) {
442
- if (dep.computed.effect._dirtyLevel === 2) {
443
- resetTracking();
444
- return true;
445
- }
446
443
  triggerComputed(dep.computed);
447
- if (this._dirtyLevel >= 5) {
444
+ if (this._dirtyLevel >= 4) {
448
445
  break;
449
446
  }
450
447
  }
@@ -454,10 +451,10 @@ class ReactiveEffect {
454
451
  }
455
452
  resetTracking();
456
453
  }
457
- return this._dirtyLevel >= 5;
454
+ return this._dirtyLevel >= 4;
458
455
  }
459
456
  set dirty(v) {
460
- this._dirtyLevel = v ? 5 : 0;
457
+ this._dirtyLevel = v ? 4 : 0;
461
458
  }
462
459
  run() {
463
460
  this._dirtyLevel = 0;
@@ -579,17 +576,8 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
579
576
  pauseScheduling();
580
577
  for (const effect2 of dep.keys()) {
581
578
  let tracking;
582
- if (!dep.computed && effect2.computed) {
583
- if (effect2._runnings > 0 && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
584
- effect2._dirtyLevel = 2;
585
- continue;
586
- }
587
- }
588
579
  if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
589
580
  effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
590
- if (effect2.computed && effect2._dirtyLevel === 2) {
591
- effect2._shouldSchedule = true;
592
- }
593
581
  effect2._dirtyLevel = dirtyLevel;
594
582
  }
595
583
  if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
@@ -597,7 +585,7 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
597
585
  (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
598
586
  }
599
587
  effect2.trigger();
600
- if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 3) {
588
+ if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
601
589
  effect2._shouldSchedule = false;
602
590
  if (effect2.scheduler) {
603
591
  queueEffectSchedulers.push(effect2.scheduler);
@@ -689,7 +677,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
689
677
  if (dep) {
690
678
  triggerEffects(
691
679
  dep,
692
- 5,
680
+ 4,
693
681
  !!(process.env.NODE_ENV !== "production") ? {
694
682
  target,
695
683
  type,
@@ -1292,7 +1280,7 @@ class ComputedRefImpl {
1292
1280
  () => getter(this._value),
1293
1281
  () => triggerRefValue(
1294
1282
  this,
1295
- this.effect._dirtyLevel === 3 ? 3 : 4
1283
+ this.effect._dirtyLevel === 2 ? 2 : 3
1296
1284
  )
1297
1285
  );
1298
1286
  this.effect.computed = this;
@@ -1301,11 +1289,8 @@ class ComputedRefImpl {
1301
1289
  }
1302
1290
  get value() {
1303
1291
  const self = toRaw(this);
1304
- const lastDirtyLevel = self.effect._dirtyLevel;
1305
1292
  if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
1306
- if (lastDirtyLevel !== 3) {
1307
- triggerRefValue(self, 5);
1308
- }
1293
+ triggerRefValue(self, 4);
1309
1294
  }
1310
1295
  trackRefValue(self);
1311
1296
  if (self.effect._dirtyLevel >= 2) {
@@ -1314,7 +1299,7 @@ class ComputedRefImpl {
1314
1299
 
1315
1300
  getter: `, this.getter);
1316
1301
  }
1317
- triggerRefValue(self, 3);
1302
+ triggerRefValue(self, 2);
1318
1303
  }
1319
1304
  return self._value;
1320
1305
  }
@@ -1369,7 +1354,7 @@ function trackRefValue(ref2) {
1369
1354
  );
1370
1355
  }
1371
1356
  }
1372
- function triggerRefValue(ref2, dirtyLevel = 5, newVal, oldVal) {
1357
+ function triggerRefValue(ref2, dirtyLevel = 4, newVal, oldVal) {
1373
1358
  ref2 = toRaw(ref2);
1374
1359
  const dep = ref2.dep;
1375
1360
  if (dep) {
@@ -1420,12 +1405,12 @@ class RefImpl {
1420
1405
  const oldVal = this._rawValue;
1421
1406
  this._rawValue = newVal;
1422
1407
  this._value = useDirectValue ? newVal : toReactive(newVal);
1423
- triggerRefValue(this, 5, newVal, oldVal);
1408
+ triggerRefValue(this, 4, newVal, oldVal);
1424
1409
  }
1425
1410
  }
1426
1411
  }
1427
1412
  function triggerRef(ref2) {
1428
- triggerRefValue(ref2, 5, !!(process.env.NODE_ENV !== "production") ? ref2.value : void 0);
1413
+ triggerRefValue(ref2, 4, !!(process.env.NODE_ENV !== "production") ? ref2.value : void 0);
1429
1414
  }
1430
1415
  function unref(ref2) {
1431
1416
  return isRef(ref2) ? ref2.value : ref2;
@@ -5635,7 +5620,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5635
5620
  return vm;
5636
5621
  }
5637
5622
  }
5638
- Vue.version = `2.6.14-compat:${"3.4.30"}`;
5623
+ Vue.version = `2.6.14-compat:${"3.4.31"}`;
5639
5624
  Vue.config = singletonApp.config;
5640
5625
  Vue.use = (plugin, ...options) => {
5641
5626
  if (plugin && isFunction(plugin.install)) {
@@ -11451,7 +11436,7 @@ function isMemoSame(cached, memo) {
11451
11436
  return true;
11452
11437
  }
11453
11438
 
11454
- const version = "3.4.30";
11439
+ const version = "3.4.31";
11455
11440
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
11456
11441
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11457
11442
  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
  **/
@@ -263,11 +263,14 @@ var Vue = (function () {
263
263
  return arr.findIndex((item) => looseEqual(item, val));
264
264
  }
265
265
 
266
+ const isRef$1 = (val) => {
267
+ return !!(val && val.__v_isRef === true);
268
+ };
266
269
  const toDisplayString = (val) => {
267
- return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
270
+ 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);
268
271
  };
269
272
  const replacer = (_key, val) => {
270
- if (val && val.__v_isRef) {
273
+ if (isRef$1(val)) {
271
274
  return replacer(_key, val.value);
272
275
  } else if (isMap(val)) {
273
276
  return {
@@ -414,7 +417,7 @@ var Vue = (function () {
414
417
  /**
415
418
  * @internal
416
419
  */
417
- this._dirtyLevel = 5;
420
+ this._dirtyLevel = 4;
418
421
  /**
419
422
  * @internal
420
423
  */
@@ -434,20 +437,14 @@ var Vue = (function () {
434
437
  recordEffectScope(this, scope);
435
438
  }
436
439
  get dirty() {
437
- if (this._dirtyLevel === 2)
438
- return false;
439
- if (this._dirtyLevel === 3 || this._dirtyLevel === 4) {
440
+ if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
440
441
  this._dirtyLevel = 1;
441
442
  pauseTracking();
442
443
  for (let i = 0; i < this._depsLength; i++) {
443
444
  const dep = this.deps[i];
444
445
  if (dep.computed) {
445
- if (dep.computed.effect._dirtyLevel === 2) {
446
- resetTracking();
447
- return true;
448
- }
449
446
  triggerComputed(dep.computed);
450
- if (this._dirtyLevel >= 5) {
447
+ if (this._dirtyLevel >= 4) {
451
448
  break;
452
449
  }
453
450
  }
@@ -457,10 +454,10 @@ var Vue = (function () {
457
454
  }
458
455
  resetTracking();
459
456
  }
460
- return this._dirtyLevel >= 5;
457
+ return this._dirtyLevel >= 4;
461
458
  }
462
459
  set dirty(v) {
463
- this._dirtyLevel = v ? 5 : 0;
460
+ this._dirtyLevel = v ? 4 : 0;
464
461
  }
465
462
  run() {
466
463
  this._dirtyLevel = 0;
@@ -582,17 +579,8 @@ var Vue = (function () {
582
579
  pauseScheduling();
583
580
  for (const effect2 of dep.keys()) {
584
581
  let tracking;
585
- if (!dep.computed && effect2.computed) {
586
- if (effect2._runnings > 0 && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
587
- effect2._dirtyLevel = 2;
588
- continue;
589
- }
590
- }
591
582
  if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
592
583
  effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
593
- if (effect2.computed && effect2._dirtyLevel === 2) {
594
- effect2._shouldSchedule = true;
595
- }
596
584
  effect2._dirtyLevel = dirtyLevel;
597
585
  }
598
586
  if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
@@ -600,7 +588,7 @@ var Vue = (function () {
600
588
  (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
601
589
  }
602
590
  effect2.trigger();
603
- if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 3) {
591
+ if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
604
592
  effect2._shouldSchedule = false;
605
593
  if (effect2.scheduler) {
606
594
  queueEffectSchedulers.push(effect2.scheduler);
@@ -692,7 +680,7 @@ var Vue = (function () {
692
680
  if (dep) {
693
681
  triggerEffects(
694
682
  dep,
695
- 5,
683
+ 4,
696
684
  {
697
685
  target,
698
686
  type,
@@ -1295,7 +1283,7 @@ var Vue = (function () {
1295
1283
  () => getter(this._value),
1296
1284
  () => triggerRefValue(
1297
1285
  this,
1298
- this.effect._dirtyLevel === 3 ? 3 : 4
1286
+ this.effect._dirtyLevel === 2 ? 2 : 3
1299
1287
  )
1300
1288
  );
1301
1289
  this.effect.computed = this;
@@ -1304,11 +1292,8 @@ var Vue = (function () {
1304
1292
  }
1305
1293
  get value() {
1306
1294
  const self = toRaw(this);
1307
- const lastDirtyLevel = self.effect._dirtyLevel;
1308
1295
  if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
1309
- if (lastDirtyLevel !== 3) {
1310
- triggerRefValue(self, 5);
1311
- }
1296
+ triggerRefValue(self, 4);
1312
1297
  }
1313
1298
  trackRefValue(self);
1314
1299
  if (self.effect._dirtyLevel >= 2) {
@@ -1317,7 +1302,7 @@ var Vue = (function () {
1317
1302
 
1318
1303
  getter: `, this.getter);
1319
1304
  }
1320
- triggerRefValue(self, 3);
1305
+ triggerRefValue(self, 2);
1321
1306
  }
1322
1307
  return self._value;
1323
1308
  }
@@ -1372,7 +1357,7 @@ getter: `, this.getter);
1372
1357
  );
1373
1358
  }
1374
1359
  }
1375
- function triggerRefValue(ref2, dirtyLevel = 5, newVal, oldVal) {
1360
+ function triggerRefValue(ref2, dirtyLevel = 4, newVal, oldVal) {
1376
1361
  ref2 = toRaw(ref2);
1377
1362
  const dep = ref2.dep;
1378
1363
  if (dep) {
@@ -1423,12 +1408,12 @@ getter: `, this.getter);
1423
1408
  const oldVal = this._rawValue;
1424
1409
  this._rawValue = newVal;
1425
1410
  this._value = useDirectValue ? newVal : toReactive(newVal);
1426
- triggerRefValue(this, 5, newVal, oldVal);
1411
+ triggerRefValue(this, 4, newVal, oldVal);
1427
1412
  }
1428
1413
  }
1429
1414
  }
1430
1415
  function triggerRef(ref2) {
1431
- triggerRefValue(ref2, 5, ref2.value );
1416
+ triggerRefValue(ref2, 4, ref2.value );
1432
1417
  }
1433
1418
  function unref(ref2) {
1434
1419
  return isRef(ref2) ? ref2.value : ref2;
@@ -5630,7 +5615,7 @@ If this is a native custom element, make sure to exclude it from component resol
5630
5615
  return vm;
5631
5616
  }
5632
5617
  }
5633
- Vue.version = `2.6.14-compat:${"3.4.30"}`;
5618
+ Vue.version = `2.6.14-compat:${"3.4.31"}`;
5634
5619
  Vue.config = singletonApp.config;
5635
5620
  Vue.use = (plugin, ...options) => {
5636
5621
  if (plugin && isFunction(plugin.install)) {
@@ -11335,7 +11320,7 @@ Component that was made reactive: `,
11335
11320
  return true;
11336
11321
  }
11337
11322
 
11338
- const version = "3.4.30";
11323
+ const version = "3.4.31";
11339
11324
  const warn = warn$1 ;
11340
11325
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11341
11326
  const devtools = devtools$1 ;