vue 3.5.33 → 3.5.34

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 v3.5.33
2
+ * vue v3.5.34
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.5.33
2
+ * vue v3.5.34
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.5.33
2
+ * vue v3.5.34
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -427,12 +427,18 @@ class EffectScope {
427
427
  */
428
428
  this.cleanups = [];
429
429
  this._isPaused = false;
430
+ this._warnOnRun = true;
430
431
  this.__v_skip = true;
431
- this.parent = activeEffectScope;
432
432
  if (!detached && activeEffectScope) {
433
- this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
434
- this
435
- ) - 1;
433
+ if (activeEffectScope.active) {
434
+ this.parent = activeEffectScope;
435
+ this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
436
+ this
437
+ ) - 1;
438
+ } else {
439
+ this._active = false;
440
+ this._warnOnRun = false;
441
+ }
436
442
  }
437
443
  }
438
444
  get active() {
@@ -480,7 +486,7 @@ class EffectScope {
480
486
  } finally {
481
487
  activeEffectScope = currentEffectScope;
482
488
  }
483
- } else {
489
+ } else if (this._warnOnRun) {
484
490
  warn$2(`cannot run an inactive effect scope.`);
485
491
  }
486
492
  }
@@ -586,8 +592,12 @@ class ReactiveEffect {
586
592
  */
587
593
  this.cleanup = void 0;
588
594
  this.scheduler = void 0;
589
- if (activeEffectScope && activeEffectScope.active) {
590
- activeEffectScope.effects.push(this);
595
+ if (activeEffectScope) {
596
+ if (activeEffectScope.active) {
597
+ activeEffectScope.effects.push(this);
598
+ } else {
599
+ this.flags &= -2;
600
+ }
591
601
  }
592
602
  }
593
603
  pause() {
@@ -7515,7 +7525,7 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
7515
7525
  const receivedType = toRawType(value);
7516
7526
  const expectedValue = styleValue(value, expectedType);
7517
7527
  const receivedValue = styleValue(value, receivedType);
7518
- if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
7528
+ if (expectedTypes.length === 1 && isExplicable(expectedType) && isCoercible(expectedType, receivedType)) {
7519
7529
  message += ` with value ${expectedValue}`;
7520
7530
  }
7521
7531
  message += `, got ${receivedType} `;
@@ -7525,7 +7535,9 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
7525
7535
  return message;
7526
7536
  }
7527
7537
  function styleValue(value, type) {
7528
- if (type === "String") {
7538
+ if (isSymbol(value)) {
7539
+ return value.toString();
7540
+ } else if (type === "String") {
7529
7541
  return `"${value}"`;
7530
7542
  } else if (type === "Number") {
7531
7543
  return `${Number(value)}`;
@@ -7537,8 +7549,11 @@ function isExplicable(type) {
7537
7549
  const explicitTypes = ["string", "number", "boolean"];
7538
7550
  return explicitTypes.some((elem) => type.toLowerCase() === elem);
7539
7551
  }
7540
- function isBoolean(...args) {
7541
- return args.some((elem) => elem.toLowerCase() === "boolean");
7552
+ function isCoercible(...args) {
7553
+ return args.every((elem) => {
7554
+ const value = elem.toLowerCase();
7555
+ return value !== "boolean" && value !== "symbol";
7556
+ });
7542
7557
  }
7543
7558
 
7544
7559
  const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
@@ -9558,13 +9573,14 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
9558
9573
  suspense.isHydrating = false;
9559
9574
  } else if (!resume) {
9560
9575
  delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
9576
+ let hasUpdatedAnchor = false;
9561
9577
  if (delayEnter) {
9562
9578
  activeBranch.transition.afterLeave = () => {
9563
9579
  if (pendingId === suspense.pendingId) {
9564
9580
  move(
9565
9581
  pendingBranch,
9566
9582
  container2,
9567
- anchor === initialAnchor ? next(activeBranch) : anchor,
9583
+ anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor,
9568
9584
  0
9569
9585
  );
9570
9586
  queuePostFlushCb(effects);
@@ -9577,6 +9593,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
9577
9593
  if (activeBranch && !suspense.isFallbackMountPending) {
9578
9594
  if (parentNode(activeBranch.el) === container2) {
9579
9595
  anchor = next(activeBranch);
9596
+ hasUpdatedAnchor = true;
9580
9597
  }
9581
9598
  unmount(activeBranch, parentComponent2, suspense, true);
9582
9599
  if (!delayEnter && isInFallback && vnode2.ssFallback) {
@@ -10883,7 +10900,7 @@ function isMemoSame(cached, memo) {
10883
10900
  return true;
10884
10901
  }
10885
10902
 
10886
- const version = "3.5.33";
10903
+ const version = "3.5.34";
10887
10904
  const warn = warn$1 ;
10888
10905
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10889
10906
  const devtools = devtools$1 ;