@vue/compat 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/compat v3.5.33
2
+ * @vue/compat v3.5.34
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -480,12 +480,18 @@ class EffectScope {
480
480
  */
481
481
  this.cleanups = [];
482
482
  this._isPaused = false;
483
+ this._warnOnRun = true;
483
484
  this.__v_skip = true;
484
- this.parent = activeEffectScope;
485
485
  if (!detached && activeEffectScope) {
486
- this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
487
- this
488
- ) - 1;
486
+ if (activeEffectScope.active) {
487
+ this.parent = activeEffectScope;
488
+ this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
489
+ this
490
+ ) - 1;
491
+ } else {
492
+ this._active = false;
493
+ this._warnOnRun = false;
494
+ }
489
495
  }
490
496
  }
491
497
  get active() {
@@ -533,7 +539,7 @@ class EffectScope {
533
539
  } finally {
534
540
  activeEffectScope = currentEffectScope;
535
541
  }
536
- } else {
542
+ } else if (this._warnOnRun) {
537
543
  warn$2(`cannot run an inactive effect scope.`);
538
544
  }
539
545
  }
@@ -639,8 +645,12 @@ class ReactiveEffect {
639
645
  */
640
646
  this.cleanup = void 0;
641
647
  this.scheduler = void 0;
642
- if (activeEffectScope && activeEffectScope.active) {
643
- activeEffectScope.effects.push(this);
648
+ if (activeEffectScope) {
649
+ if (activeEffectScope.active) {
650
+ activeEffectScope.effects.push(this);
651
+ } else {
652
+ this.flags &= -2;
653
+ }
644
654
  }
645
655
  }
646
656
  pause() {
@@ -7587,7 +7597,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7587
7597
  return vm;
7588
7598
  }
7589
7599
  }
7590
- Vue.version = `2.6.14-compat:${"3.5.33"}`;
7600
+ Vue.version = `2.6.14-compat:${"3.5.34"}`;
7591
7601
  Vue.config = singletonApp.config;
7592
7602
  Vue.use = (plugin, ...options) => {
7593
7603
  if (plugin && isFunction(plugin.install)) {
@@ -9222,7 +9232,7 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
9222
9232
  const receivedType = toRawType(value);
9223
9233
  const expectedValue = styleValue(value, expectedType);
9224
9234
  const receivedValue = styleValue(value, receivedType);
9225
- if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
9235
+ if (expectedTypes.length === 1 && isExplicable(expectedType) && isCoercible(expectedType, receivedType)) {
9226
9236
  message += ` with value ${expectedValue}`;
9227
9237
  }
9228
9238
  message += `, got ${receivedType} `;
@@ -9232,7 +9242,9 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
9232
9242
  return message;
9233
9243
  }
9234
9244
  function styleValue(value, type) {
9235
- if (type === "String") {
9245
+ if (isSymbol(value)) {
9246
+ return value.toString();
9247
+ } else if (type === "String") {
9236
9248
  return `"${value}"`;
9237
9249
  } else if (type === "Number") {
9238
9250
  return `${Number(value)}`;
@@ -9244,8 +9256,11 @@ function isExplicable(type) {
9244
9256
  const explicitTypes = ["string", "number", "boolean"];
9245
9257
  return explicitTypes.some((elem) => type.toLowerCase() === elem);
9246
9258
  }
9247
- function isBoolean(...args) {
9248
- return args.some((elem) => elem.toLowerCase() === "boolean");
9259
+ function isCoercible(...args) {
9260
+ return args.every((elem) => {
9261
+ const value = elem.toLowerCase();
9262
+ return value !== "boolean" && value !== "symbol";
9263
+ });
9249
9264
  }
9250
9265
 
9251
9266
  const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
@@ -11299,13 +11314,14 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11299
11314
  suspense.isHydrating = false;
11300
11315
  } else if (!resume) {
11301
11316
  delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
11317
+ let hasUpdatedAnchor = false;
11302
11318
  if (delayEnter) {
11303
11319
  activeBranch.transition.afterLeave = () => {
11304
11320
  if (pendingId === suspense.pendingId) {
11305
11321
  move(
11306
11322
  pendingBranch,
11307
11323
  container2,
11308
- anchor === initialAnchor ? next(activeBranch) : anchor,
11324
+ anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor,
11309
11325
  0
11310
11326
  );
11311
11327
  queuePostFlushCb(effects);
@@ -11318,6 +11334,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11318
11334
  if (activeBranch && !suspense.isFallbackMountPending) {
11319
11335
  if (parentNode(activeBranch.el) === container2) {
11320
11336
  anchor = next(activeBranch);
11337
+ hasUpdatedAnchor = true;
11321
11338
  }
11322
11339
  unmount(activeBranch, parentComponent2, suspense, true);
11323
11340
  if (!delayEnter && isInFallback && vnode2.ssFallback) {
@@ -12703,7 +12720,7 @@ function isMemoSame(cached, memo) {
12703
12720
  return true;
12704
12721
  }
12705
12722
 
12706
- const version = "3.5.33";
12723
+ const version = "3.5.34";
12707
12724
  const warn = warn$1 ;
12708
12725
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12709
12726
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.33
2
+ * @vue/compat v3.5.34
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -379,12 +379,18 @@ class EffectScope {
379
379
  */
380
380
  this.cleanups = [];
381
381
  this._isPaused = false;
382
+ this._warnOnRun = true;
382
383
  this.__v_skip = true;
383
- this.parent = activeEffectScope;
384
384
  if (!detached && activeEffectScope) {
385
- this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
386
- this
387
- ) - 1;
385
+ if (activeEffectScope.active) {
386
+ this.parent = activeEffectScope;
387
+ this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
388
+ this
389
+ ) - 1;
390
+ } else {
391
+ this._active = false;
392
+ this._warnOnRun = false;
393
+ }
388
394
  }
389
395
  }
390
396
  get active() {
@@ -532,8 +538,12 @@ class ReactiveEffect {
532
538
  */
533
539
  this.cleanup = void 0;
534
540
  this.scheduler = void 0;
535
- if (activeEffectScope && activeEffectScope.active) {
536
- activeEffectScope.effects.push(this);
541
+ if (activeEffectScope) {
542
+ if (activeEffectScope.active) {
543
+ activeEffectScope.effects.push(this);
544
+ } else {
545
+ this.flags &= -2;
546
+ }
537
547
  }
538
548
  }
539
549
  pause() {
@@ -6098,7 +6108,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6098
6108
  return vm;
6099
6109
  }
6100
6110
  }
6101
- Vue.version = `2.6.14-compat:${"3.5.33"}`;
6111
+ Vue.version = `2.6.14-compat:${"3.5.34"}`;
6102
6112
  Vue.config = singletonApp.config;
6103
6113
  Vue.use = (plugin, ...options) => {
6104
6114
  if (plugin && isFunction(plugin.install)) {
@@ -9197,13 +9207,14 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
9197
9207
  suspense.isHydrating = false;
9198
9208
  } else if (!resume) {
9199
9209
  delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
9210
+ let hasUpdatedAnchor = false;
9200
9211
  if (delayEnter) {
9201
9212
  activeBranch.transition.afterLeave = () => {
9202
9213
  if (pendingId === suspense.pendingId) {
9203
9214
  move(
9204
9215
  pendingBranch,
9205
9216
  container2,
9206
- anchor === initialAnchor ? next(activeBranch) : anchor,
9217
+ anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor,
9207
9218
  0
9208
9219
  );
9209
9220
  queuePostFlushCb(effects);
@@ -9216,6 +9227,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
9216
9227
  if (activeBranch && !suspense.isFallbackMountPending) {
9217
9228
  if (parentNode(activeBranch.el) === container2) {
9218
9229
  anchor = next(activeBranch);
9230
+ hasUpdatedAnchor = true;
9219
9231
  }
9220
9232
  unmount(activeBranch, parentComponent2, suspense, true);
9221
9233
  if (!delayEnter && isInFallback && vnode2.ssFallback) {
@@ -10234,7 +10246,7 @@ function isMemoSame(cached, memo) {
10234
10246
  return true;
10235
10247
  }
10236
10248
 
10237
- const version = "3.5.33";
10249
+ const version = "3.5.34";
10238
10250
  const warn$1 = NOOP;
10239
10251
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10240
10252
  const devtools = void 0;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.33
2
+ * @vue/compat 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() {
@@ -7537,7 +7547,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7537
7547
  return vm;
7538
7548
  }
7539
7549
  }
7540
- Vue.version = `2.6.14-compat:${"3.5.33"}`;
7550
+ Vue.version = `2.6.14-compat:${"3.5.34"}`;
7541
7551
  Vue.config = singletonApp.config;
7542
7552
  Vue.use = (plugin, ...options) => {
7543
7553
  if (plugin && isFunction(plugin.install)) {
@@ -9172,7 +9182,7 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
9172
9182
  const receivedType = toRawType(value);
9173
9183
  const expectedValue = styleValue(value, expectedType);
9174
9184
  const receivedValue = styleValue(value, receivedType);
9175
- if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
9185
+ if (expectedTypes.length === 1 && isExplicable(expectedType) && isCoercible(expectedType, receivedType)) {
9176
9186
  message += ` with value ${expectedValue}`;
9177
9187
  }
9178
9188
  message += `, got ${receivedType} `;
@@ -9182,7 +9192,9 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
9182
9192
  return message;
9183
9193
  }
9184
9194
  function styleValue(value, type) {
9185
- if (type === "String") {
9195
+ if (isSymbol(value)) {
9196
+ return value.toString();
9197
+ } else if (type === "String") {
9186
9198
  return `"${value}"`;
9187
9199
  } else if (type === "Number") {
9188
9200
  return `${Number(value)}`;
@@ -9194,8 +9206,11 @@ function isExplicable(type) {
9194
9206
  const explicitTypes = ["string", "number", "boolean"];
9195
9207
  return explicitTypes.some((elem) => type.toLowerCase() === elem);
9196
9208
  }
9197
- function isBoolean(...args) {
9198
- return args.some((elem) => elem.toLowerCase() === "boolean");
9209
+ function isCoercible(...args) {
9210
+ return args.every((elem) => {
9211
+ const value = elem.toLowerCase();
9212
+ return value !== "boolean" && value !== "symbol";
9213
+ });
9199
9214
  }
9200
9215
 
9201
9216
  const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
@@ -11249,13 +11264,14 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11249
11264
  suspense.isHydrating = false;
11250
11265
  } else if (!resume) {
11251
11266
  delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
11267
+ let hasUpdatedAnchor = false;
11252
11268
  if (delayEnter) {
11253
11269
  activeBranch.transition.afterLeave = () => {
11254
11270
  if (pendingId === suspense.pendingId) {
11255
11271
  move(
11256
11272
  pendingBranch,
11257
11273
  container2,
11258
- anchor === initialAnchor ? next(activeBranch) : anchor,
11274
+ anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor,
11259
11275
  0
11260
11276
  );
11261
11277
  queuePostFlushCb(effects);
@@ -11268,6 +11284,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11268
11284
  if (activeBranch && !suspense.isFallbackMountPending) {
11269
11285
  if (parentNode(activeBranch.el) === container2) {
11270
11286
  anchor = next(activeBranch);
11287
+ hasUpdatedAnchor = true;
11271
11288
  }
11272
11289
  unmount(activeBranch, parentComponent2, suspense, true);
11273
11290
  if (!delayEnter && isInFallback && vnode2.ssFallback) {
@@ -12653,7 +12670,7 @@ function isMemoSame(cached, memo) {
12653
12670
  return true;
12654
12671
  }
12655
12672
 
12656
- const version = "3.5.33";
12673
+ const version = "3.5.34";
12657
12674
  const warn = warn$1 ;
12658
12675
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12659
12676
  const devtools = devtools$1 ;