@vue/compat 3.4.11 → 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.11
2
+ * @vue/compat v3.4.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -400,7 +400,7 @@ class ReactiveEffect {
400
400
  /**
401
401
  * @internal
402
402
  */
403
- this._dirtyLevel = 3;
403
+ this._dirtyLevel = 2;
404
404
  /**
405
405
  * @internal
406
406
  */
@@ -412,7 +412,7 @@ class ReactiveEffect {
412
412
  /**
413
413
  * @internal
414
414
  */
415
- this._queryings = 0;
415
+ this._shouldSchedule = false;
416
416
  /**
417
417
  * @internal
418
418
  */
@@ -421,10 +421,9 @@ class ReactiveEffect {
421
421
  }
422
422
  get dirty() {
423
423
  if (this._dirtyLevel === 1) {
424
- this._dirtyLevel = 0;
425
- this._queryings++;
426
424
  pauseTracking();
427
- for (const dep of this.deps) {
425
+ for (let i = 0; i < this._depsLength; i++) {
426
+ const dep = this.deps[i];
428
427
  if (dep.computed) {
429
428
  triggerComputed(dep.computed);
430
429
  if (this._dirtyLevel >= 2) {
@@ -432,13 +431,15 @@ class ReactiveEffect {
432
431
  }
433
432
  }
434
433
  }
434
+ if (this._dirtyLevel < 2) {
435
+ this._dirtyLevel = 0;
436
+ }
435
437
  resetTracking();
436
- this._queryings--;
437
438
  }
438
439
  return this._dirtyLevel >= 2;
439
440
  }
440
441
  set dirty(v) {
441
- this._dirtyLevel = v ? 3 : 0;
442
+ this._dirtyLevel = v ? 2 : 0;
442
443
  }
443
444
  run() {
444
445
  this._dirtyLevel = 0;
@@ -561,22 +562,24 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
561
562
  var _a;
562
563
  pauseScheduling();
563
564
  for (const effect2 of dep.keys()) {
564
- if (!effect2.allowRecurse && effect2._runnings) {
565
+ if (dep.get(effect2) !== effect2._trackId) {
565
566
  continue;
566
567
  }
567
- if (effect2._dirtyLevel < dirtyLevel && (!effect2._runnings || effect2.allowRecurse || dirtyLevel !== 2)) {
568
+ if (effect2._dirtyLevel < dirtyLevel) {
568
569
  const lastDirtyLevel = effect2._dirtyLevel;
569
570
  effect2._dirtyLevel = dirtyLevel;
570
- if (lastDirtyLevel === 0 && (!effect2._queryings || dirtyLevel !== 2)) {
571
+ if (lastDirtyLevel === 0) {
572
+ effect2._shouldSchedule = true;
571
573
  if (!!(process.env.NODE_ENV !== "production")) {
572
574
  (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
573
575
  }
574
576
  effect2.trigger();
575
- if (effect2.scheduler) {
576
- queueEffectSchedulers.push(effect2.scheduler);
577
- }
578
577
  }
579
578
  }
579
+ if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {
580
+ effect2._shouldSchedule = false;
581
+ queueEffectSchedulers.push(effect2.scheduler);
582
+ }
580
583
  }
581
584
  resetScheduling();
582
585
  }
@@ -662,7 +665,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
662
665
  if (dep) {
663
666
  triggerEffects(
664
667
  dep,
665
- 3,
668
+ 2,
666
669
  !!(process.env.NODE_ENV !== "production") ? {
667
670
  target,
668
671
  type,
@@ -1269,12 +1272,12 @@ class ComputedRefImpl {
1269
1272
  }
1270
1273
  get value() {
1271
1274
  const self = toRaw(this);
1272
- trackRefValue(self);
1273
1275
  if (!self._cacheable || self.effect.dirty) {
1274
1276
  if (hasChanged(self._value, self._value = self.effect.run())) {
1275
1277
  triggerRefValue(self, 2);
1276
1278
  }
1277
1279
  }
1280
+ trackRefValue(self);
1278
1281
  return self._value;
1279
1282
  }
1280
1283
  set value(newValue) {
@@ -1327,7 +1330,7 @@ function trackRefValue(ref2) {
1327
1330
  );
1328
1331
  }
1329
1332
  }
1330
- function triggerRefValue(ref2, dirtyLevel = 3, newVal) {
1333
+ function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
1331
1334
  ref2 = toRaw(ref2);
1332
1335
  const dep = ref2.dep;
1333
1336
  if (dep) {
@@ -1376,12 +1379,12 @@ class RefImpl {
1376
1379
  if (hasChanged(newVal, this._rawValue)) {
1377
1380
  this._rawValue = newVal;
1378
1381
  this._value = useDirectValue ? newVal : toReactive(newVal);
1379
- triggerRefValue(this, 3, newVal);
1382
+ triggerRefValue(this, 2, newVal);
1380
1383
  }
1381
1384
  }
1382
1385
  }
1383
1386
  function triggerRef(ref2) {
1384
- triggerRefValue(ref2, 3, !!(process.env.NODE_ENV !== "production") ? ref2.value : void 0);
1387
+ triggerRefValue(ref2, 2, !!(process.env.NODE_ENV !== "production") ? ref2.value : void 0);
1385
1388
  }
1386
1389
  function unref(ref2) {
1387
1390
  return isRef(ref2) ? ref2.value : ref2;
@@ -6458,7 +6461,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6458
6461
  return vm;
6459
6462
  }
6460
6463
  }
6461
- Vue.version = `2.6.14-compat:${"3.4.11"}`;
6464
+ Vue.version = `2.6.14-compat:${"3.4.13"}`;
6462
6465
  Vue.config = singletonApp.config;
6463
6466
  Vue.use = (p, ...options) => {
6464
6467
  if (p && isFunction(p.install)) {
@@ -11357,7 +11360,7 @@ function isMemoSame(cached, memo) {
11357
11360
  return true;
11358
11361
  }
11359
11362
 
11360
- const version = "3.4.11";
11363
+ const version = "3.4.13";
11361
11364
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
11362
11365
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11363
11366
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.4.11
2
+ * @vue/compat v3.4.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -403,7 +403,7 @@ var Vue = (function () {
403
403
  /**
404
404
  * @internal
405
405
  */
406
- this._dirtyLevel = 3;
406
+ this._dirtyLevel = 2;
407
407
  /**
408
408
  * @internal
409
409
  */
@@ -415,7 +415,7 @@ var Vue = (function () {
415
415
  /**
416
416
  * @internal
417
417
  */
418
- this._queryings = 0;
418
+ this._shouldSchedule = false;
419
419
  /**
420
420
  * @internal
421
421
  */
@@ -424,10 +424,9 @@ var Vue = (function () {
424
424
  }
425
425
  get dirty() {
426
426
  if (this._dirtyLevel === 1) {
427
- this._dirtyLevel = 0;
428
- this._queryings++;
429
427
  pauseTracking();
430
- for (const dep of this.deps) {
428
+ for (let i = 0; i < this._depsLength; i++) {
429
+ const dep = this.deps[i];
431
430
  if (dep.computed) {
432
431
  triggerComputed(dep.computed);
433
432
  if (this._dirtyLevel >= 2) {
@@ -435,13 +434,15 @@ var Vue = (function () {
435
434
  }
436
435
  }
437
436
  }
437
+ if (this._dirtyLevel < 2) {
438
+ this._dirtyLevel = 0;
439
+ }
438
440
  resetTracking();
439
- this._queryings--;
440
441
  }
441
442
  return this._dirtyLevel >= 2;
442
443
  }
443
444
  set dirty(v) {
444
- this._dirtyLevel = v ? 3 : 0;
445
+ this._dirtyLevel = v ? 2 : 0;
445
446
  }
446
447
  run() {
447
448
  this._dirtyLevel = 0;
@@ -564,22 +565,24 @@ var Vue = (function () {
564
565
  var _a;
565
566
  pauseScheduling();
566
567
  for (const effect2 of dep.keys()) {
567
- if (!effect2.allowRecurse && effect2._runnings) {
568
+ if (dep.get(effect2) !== effect2._trackId) {
568
569
  continue;
569
570
  }
570
- if (effect2._dirtyLevel < dirtyLevel && (!effect2._runnings || effect2.allowRecurse || dirtyLevel !== 2)) {
571
+ if (effect2._dirtyLevel < dirtyLevel) {
571
572
  const lastDirtyLevel = effect2._dirtyLevel;
572
573
  effect2._dirtyLevel = dirtyLevel;
573
- if (lastDirtyLevel === 0 && (!effect2._queryings || dirtyLevel !== 2)) {
574
+ if (lastDirtyLevel === 0) {
575
+ effect2._shouldSchedule = true;
574
576
  {
575
577
  (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
576
578
  }
577
579
  effect2.trigger();
578
- if (effect2.scheduler) {
579
- queueEffectSchedulers.push(effect2.scheduler);
580
- }
581
580
  }
582
581
  }
582
+ if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {
583
+ effect2._shouldSchedule = false;
584
+ queueEffectSchedulers.push(effect2.scheduler);
585
+ }
583
586
  }
584
587
  resetScheduling();
585
588
  }
@@ -665,7 +668,7 @@ var Vue = (function () {
665
668
  if (dep) {
666
669
  triggerEffects(
667
670
  dep,
668
- 3,
671
+ 2,
669
672
  {
670
673
  target,
671
674
  type,
@@ -1272,12 +1275,12 @@ var Vue = (function () {
1272
1275
  }
1273
1276
  get value() {
1274
1277
  const self = toRaw(this);
1275
- trackRefValue(self);
1276
1278
  if (!self._cacheable || self.effect.dirty) {
1277
1279
  if (hasChanged(self._value, self._value = self.effect.run())) {
1278
1280
  triggerRefValue(self, 2);
1279
1281
  }
1280
1282
  }
1283
+ trackRefValue(self);
1281
1284
  return self._value;
1282
1285
  }
1283
1286
  set value(newValue) {
@@ -1330,7 +1333,7 @@ var Vue = (function () {
1330
1333
  );
1331
1334
  }
1332
1335
  }
1333
- function triggerRefValue(ref2, dirtyLevel = 3, newVal) {
1336
+ function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
1334
1337
  ref2 = toRaw(ref2);
1335
1338
  const dep = ref2.dep;
1336
1339
  if (dep) {
@@ -1379,12 +1382,12 @@ var Vue = (function () {
1379
1382
  if (hasChanged(newVal, this._rawValue)) {
1380
1383
  this._rawValue = newVal;
1381
1384
  this._value = useDirectValue ? newVal : toReactive(newVal);
1382
- triggerRefValue(this, 3, newVal);
1385
+ triggerRefValue(this, 2, newVal);
1383
1386
  }
1384
1387
  }
1385
1388
  }
1386
1389
  function triggerRef(ref2) {
1387
- triggerRefValue(ref2, 3, ref2.value );
1390
+ triggerRefValue(ref2, 2, ref2.value );
1388
1391
  }
1389
1392
  function unref(ref2) {
1390
1393
  return isRef(ref2) ? ref2.value : ref2;
@@ -6417,7 +6420,7 @@ If this is a native custom element, make sure to exclude it from component resol
6417
6420
  return vm;
6418
6421
  }
6419
6422
  }
6420
- Vue.version = `2.6.14-compat:${"3.4.11"}`;
6423
+ Vue.version = `2.6.14-compat:${"3.4.13"}`;
6421
6424
  Vue.config = singletonApp.config;
6422
6425
  Vue.use = (p, ...options) => {
6423
6426
  if (p && isFunction(p.install)) {
@@ -11232,7 +11235,7 @@ Component that was made reactive: `,
11232
11235
  return true;
11233
11236
  }
11234
11237
 
11235
- const version = "3.4.11";
11238
+ const version = "3.4.13";
11236
11239
  const warn = warn$1 ;
11237
11240
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11238
11241
  const devtools = devtools$1 ;