@vue/compat 3.2.31 → 3.2.32

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/README.md CHANGED
@@ -308,7 +308,6 @@ Features that start with `COMPILER_` are compiler-specific: if you are using the
308
308
  | OPTIONS_BEFORE_DESTROY | ✔ | `beforeDestroy` -> `beforeUnmount` | |
309
309
  | OPTIONS_DESTROYED | ✔ | `destroyed` -> `unmounted` | |
310
310
  | WATCH_ARRAY | ✔ | watching an array no longer triggers on mutation unless deep | [link](https://v3-migration.vuejs.org/breaking-changes/watch.html) |
311
- | V_FOR_REF | ✔ | `ref` inside `v-for` no longer registers array of refs | [link](https://v3-migration.vuejs.org/breaking-changes/array-refs.html) |
312
311
  | V_ON_KEYCODE_MODIFIER | ✔ | `v-on` no longer supports keyCode modifiers | [link](https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html) |
313
312
  | CUSTOM_DIR | ✔ | Custom directive hook names changed | [link](https://v3-migration.vuejs.org/breaking-changes/custom-directives.html) |
314
313
  | ATTR_FALSE_VALUE | ✔ | No longer removes attribute if binding value is boolean `false` | [link](https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html) |
package/dist/vue.cjs.js CHANGED
@@ -564,8 +564,17 @@ function warn(msg, ...args) {
564
564
  let activeEffectScope;
565
565
  class EffectScope {
566
566
  constructor(detached = false) {
567
+ /**
568
+ * @internal
569
+ */
567
570
  this.active = true;
571
+ /**
572
+ * @internal
573
+ */
568
574
  this.effects = [];
575
+ /**
576
+ * @internal
577
+ */
569
578
  this.cleanups = [];
570
579
  if (!detached && activeEffectScope) {
571
580
  this.parent = activeEffectScope;
@@ -575,21 +584,30 @@ class EffectScope {
575
584
  }
576
585
  run(fn) {
577
586
  if (this.active) {
587
+ const currentEffectScope = activeEffectScope;
578
588
  try {
579
589
  activeEffectScope = this;
580
590
  return fn();
581
591
  }
582
592
  finally {
583
- activeEffectScope = this.parent;
593
+ activeEffectScope = currentEffectScope;
584
594
  }
585
595
  }
586
596
  else {
587
597
  warn(`cannot run an inactive effect scope.`);
588
598
  }
589
599
  }
600
+ /**
601
+ * This should only be called on non-detached scopes
602
+ * @internal
603
+ */
590
604
  on() {
591
605
  activeEffectScope = this;
592
606
  }
607
+ /**
608
+ * This should only be called on non-detached scopes
609
+ * @internal
610
+ */
593
611
  off() {
594
612
  activeEffectScope = this.parent;
595
613
  }
@@ -813,9 +831,7 @@ function trackEffects(dep, debuggerEventExtraInfo) {
813
831
  dep.add(activeEffect);
814
832
  activeEffect.deps.push(dep);
815
833
  if (activeEffect.onTrack) {
816
- activeEffect.onTrack(Object.assign({
817
- effect: activeEffect
818
- }, debuggerEventExtraInfo));
834
+ activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo));
819
835
  }
820
836
  }
821
837
  }
@@ -3848,12 +3864,10 @@ function watchEffect(effect, options) {
3848
3864
  return doWatch(effect, null, options);
3849
3865
  }
3850
3866
  function watchPostEffect(effect, options) {
3851
- return doWatch(effect, null, (Object.assign(options || {}, { flush: 'post' })
3852
- ));
3867
+ return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) ));
3853
3868
  }
3854
3869
  function watchSyncEffect(effect, options) {
3855
- return doWatch(effect, null, (Object.assign(options || {}, { flush: 'sync' })
3856
- ));
3870
+ return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) ));
3857
3871
  }
3858
3872
  // initial value for watchers to trigger on undefined initial values
3859
3873
  const INITIAL_WATCHER_VALUE = {};
@@ -4180,7 +4194,9 @@ const BaseTransitionImpl = {
4180
4194
  const { mode } = rawProps;
4181
4195
  // check mode
4182
4196
  if (mode &&
4183
- mode !== 'in-out' && mode !== 'out-in' && mode !== 'default') {
4197
+ mode !== 'in-out' &&
4198
+ mode !== 'out-in' &&
4199
+ mode !== 'default') {
4184
4200
  warn$1(`invalid <transition> mode: ${mode}`);
4185
4201
  }
4186
4202
  // at this point children has a guaranteed length of 1.
@@ -4410,20 +4426,24 @@ function setTransitionHooks(vnode, hooks) {
4410
4426
  vnode.transition = hooks;
4411
4427
  }
4412
4428
  }
4413
- function getTransitionRawChildren(children, keepComment = false) {
4429
+ function getTransitionRawChildren(children, keepComment = false, parentKey) {
4414
4430
  let ret = [];
4415
4431
  let keyedFragmentCount = 0;
4416
4432
  for (let i = 0; i < children.length; i++) {
4417
- const child = children[i];
4433
+ let child = children[i];
4434
+ // #5360 inherit parent key in case of <template v-for>
4435
+ const key = parentKey == null
4436
+ ? child.key
4437
+ : String(parentKey) + String(child.key != null ? child.key : i);
4418
4438
  // handle fragment children case, e.g. v-for
4419
4439
  if (child.type === Fragment) {
4420
4440
  if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
4421
4441
  keyedFragmentCount++;
4422
- ret = ret.concat(getTransitionRawChildren(child.children, keepComment));
4442
+ ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
4423
4443
  }
4424
4444
  // comment placeholders should be skipped, e.g. v-if
4425
4445
  else if (keepComment || child.type !== Comment) {
4426
- ret.push(child);
4446
+ ret.push(key != null ? cloneVNode(child, { key }) : child);
4427
4447
  }
4428
4448
  }
4429
4449
  // #1126 if a transition children list contains multiple sub fragments, these
@@ -5481,6 +5501,10 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
5481
5501
  const propsToUpdate = instance.vnode.dynamicProps;
5482
5502
  for (let i = 0; i < propsToUpdate.length; i++) {
5483
5503
  let key = propsToUpdate[i];
5504
+ // skip if the prop key is a declared emit event listener
5505
+ if (isEmitListener(instance.emitsOptions, key)) {
5506
+ continue;
5507
+ }
5484
5508
  // PROPS flag guarantees rawProps to be non-null
5485
5509
  const value = rawProps[key];
5486
5510
  if (options) {
@@ -6066,7 +6090,8 @@ function withDirectives(vnode, directives) {
6066
6090
  warn$1(`withDirectives can only be used inside render functions.`);
6067
6091
  return vnode;
6068
6092
  }
6069
- const instance = internalInstance.proxy;
6093
+ const instance = getExposeProxy(internalInstance) ||
6094
+ internalInstance.proxy;
6070
6095
  const bindings = vnode.dirs || (vnode.dirs = []);
6071
6096
  for (let i = 0; i < directives.length; i++) {
6072
6097
  let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
@@ -6186,7 +6211,7 @@ function createCompatVue(createApp, createSingletonApp) {
6186
6211
  return vm;
6187
6212
  }
6188
6213
  }
6189
- Vue.version = `2.6.14-compat:${"3.2.31"}`;
6214
+ Vue.version = `2.6.14-compat:${"3.2.32"}`;
6190
6215
  Vue.config = singletonApp.config;
6191
6216
  Vue.use = (p, ...options) => {
6192
6217
  if (p && isFunction(p.install)) {
@@ -6613,6 +6638,9 @@ function createAppContext() {
6613
6638
  let uid = 0;
6614
6639
  function createAppAPI(render, hydrate) {
6615
6640
  return function createApp(rootComponent, rootProps = null) {
6641
+ if (!isFunction(rootComponent)) {
6642
+ rootComponent = Object.assign({}, rootComponent);
6643
+ }
6616
6644
  if (rootProps != null && !isObject(rootProps)) {
6617
6645
  warn$1(`root props passed to app.mount() must be an object.`);
6618
6646
  rootProps = null;
@@ -6812,6 +6840,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
6812
6840
  if (!isArray(existing)) {
6813
6841
  if (_isString) {
6814
6842
  refs[ref] = [refValue];
6843
+ if (hasOwn(setupState, ref)) {
6844
+ setupState[ref] = refs[ref];
6845
+ }
6815
6846
  }
6816
6847
  else {
6817
6848
  ref.value = [refValue];
@@ -7184,7 +7215,7 @@ function startMeasure(instance, type) {
7184
7215
  perf.mark(`vue-${type}-${instance.uid}`);
7185
7216
  }
7186
7217
  {
7187
- devtoolsPerfStart(instance, type, supported ? perf.now() : Date.now());
7218
+ devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
7188
7219
  }
7189
7220
  }
7190
7221
  function endMeasure(instance, type) {
@@ -7197,7 +7228,7 @@ function endMeasure(instance, type) {
7197
7228
  perf.clearMarks(endTag);
7198
7229
  }
7199
7230
  {
7200
- devtoolsPerfEnd(instance, type, supported ? perf.now() : Date.now());
7231
+ devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
7201
7232
  }
7202
7233
  }
7203
7234
  function isSupported() {
@@ -10206,9 +10237,10 @@ const PublicInstanceProxyHandlers = {
10206
10237
  },
10207
10238
  defineProperty(target, key, descriptor) {
10208
10239
  if (descriptor.get != null) {
10209
- this.set(target, key, descriptor.get(), null);
10240
+ // invalidate key cache of a getter based property #5417
10241
+ target.$.accessCache[key] = 0;
10210
10242
  }
10211
- else if (descriptor.value != null) {
10243
+ else if (hasOwn(descriptor, 'value')) {
10212
10244
  this.set(target, key, descriptor.value, null);
10213
10245
  }
10214
10246
  return Reflect.defineProperty(target, key, descriptor);
@@ -11106,7 +11138,7 @@ function isMemoSame(cached, memo) {
11106
11138
  }
11107
11139
 
11108
11140
  // Core API ------------------------------------------------------------------
11109
- const version = "3.2.31";
11141
+ const version = "3.2.32";
11110
11142
  const _ssrUtils = {
11111
11143
  createComponentInstance,
11112
11144
  setupComponent,
@@ -486,8 +486,17 @@ const getGlobalThis = () => {
486
486
  let activeEffectScope;
487
487
  class EffectScope {
488
488
  constructor(detached = false) {
489
+ /**
490
+ * @internal
491
+ */
489
492
  this.active = true;
493
+ /**
494
+ * @internal
495
+ */
490
496
  this.effects = [];
497
+ /**
498
+ * @internal
499
+ */
491
500
  this.cleanups = [];
492
501
  if (!detached && activeEffectScope) {
493
502
  this.parent = activeEffectScope;
@@ -497,18 +506,27 @@ class EffectScope {
497
506
  }
498
507
  run(fn) {
499
508
  if (this.active) {
509
+ const currentEffectScope = activeEffectScope;
500
510
  try {
501
511
  activeEffectScope = this;
502
512
  return fn();
503
513
  }
504
514
  finally {
505
- activeEffectScope = this.parent;
515
+ activeEffectScope = currentEffectScope;
506
516
  }
507
517
  }
508
518
  }
519
+ /**
520
+ * This should only be called on non-detached scopes
521
+ * @internal
522
+ */
509
523
  on() {
510
524
  activeEffectScope = this;
511
525
  }
526
+ /**
527
+ * This should only be called on non-detached scopes
528
+ * @internal
529
+ */
512
530
  off() {
513
531
  activeEffectScope = this.parent;
514
532
  }
@@ -3433,20 +3451,24 @@ function setTransitionHooks(vnode, hooks) {
3433
3451
  vnode.transition = hooks;
3434
3452
  }
3435
3453
  }
3436
- function getTransitionRawChildren(children, keepComment = false) {
3454
+ function getTransitionRawChildren(children, keepComment = false, parentKey) {
3437
3455
  let ret = [];
3438
3456
  let keyedFragmentCount = 0;
3439
3457
  for (let i = 0; i < children.length; i++) {
3440
- const child = children[i];
3458
+ let child = children[i];
3459
+ // #5360 inherit parent key in case of <template v-for>
3460
+ const key = parentKey == null
3461
+ ? child.key
3462
+ : String(parentKey) + String(child.key != null ? child.key : i);
3441
3463
  // handle fragment children case, e.g. v-for
3442
3464
  if (child.type === Fragment) {
3443
3465
  if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
3444
3466
  keyedFragmentCount++;
3445
- ret = ret.concat(getTransitionRawChildren(child.children, keepComment));
3467
+ ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
3446
3468
  }
3447
3469
  // comment placeholders should be skipped, e.g. v-if
3448
3470
  else if (keepComment || child.type !== Comment) {
3449
- ret.push(child);
3471
+ ret.push(key != null ? cloneVNode(child, { key }) : child);
3450
3472
  }
3451
3473
  }
3452
3474
  // #1126 if a transition children list contains multiple sub fragments, these
@@ -4380,6 +4402,10 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
4380
4402
  const propsToUpdate = instance.vnode.dynamicProps;
4381
4403
  for (let i = 0; i < propsToUpdate.length; i++) {
4382
4404
  let key = propsToUpdate[i];
4405
+ // skip if the prop key is a declared emit event listener
4406
+ if (isEmitListener(instance.emitsOptions, key)) {
4407
+ continue;
4408
+ }
4383
4409
  // PROPS flag guarantees rawProps to be non-null
4384
4410
  const value = rawProps[key];
4385
4411
  if (options) {
@@ -4798,7 +4824,8 @@ function withDirectives(vnode, directives) {
4798
4824
  if (internalInstance === null) {
4799
4825
  return vnode;
4800
4826
  }
4801
- const instance = internalInstance.proxy;
4827
+ const instance = getExposeProxy(internalInstance) ||
4828
+ internalInstance.proxy;
4802
4829
  const bindings = vnode.dirs || (vnode.dirs = []);
4803
4830
  for (let i = 0; i < directives.length; i++) {
4804
4831
  let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
@@ -4892,7 +4919,7 @@ function createCompatVue(createApp, createSingletonApp) {
4892
4919
  return vm;
4893
4920
  }
4894
4921
  }
4895
- Vue.version = `2.6.14-compat:${"3.2.31"}`;
4922
+ Vue.version = `2.6.14-compat:${"3.2.32"}`;
4896
4923
  Vue.config = singletonApp.config;
4897
4924
  Vue.use = (p, ...options) => {
4898
4925
  if (p && isFunction(p.install)) {
@@ -5279,6 +5306,9 @@ function createAppContext() {
5279
5306
  let uid = 0;
5280
5307
  function createAppAPI(render, hydrate) {
5281
5308
  return function createApp(rootComponent, rootProps = null) {
5309
+ if (!isFunction(rootComponent)) {
5310
+ rootComponent = Object.assign({}, rootComponent);
5311
+ }
5282
5312
  if (rootProps != null && !isObject(rootProps)) {
5283
5313
  rootProps = null;
5284
5314
  }
@@ -5421,6 +5451,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
5421
5451
  if (!isArray(existing)) {
5422
5452
  if (_isString) {
5423
5453
  refs[ref] = [refValue];
5454
+ if (hasOwn(setupState, ref)) {
5455
+ setupState[ref] = refs[ref];
5456
+ }
5424
5457
  }
5425
5458
  else {
5426
5459
  ref.value = [refValue];
@@ -8471,9 +8504,10 @@ const PublicInstanceProxyHandlers = {
8471
8504
  },
8472
8505
  defineProperty(target, key, descriptor) {
8473
8506
  if (descriptor.get != null) {
8474
- this.set(target, key, descriptor.get(), null);
8507
+ // invalidate key cache of a getter based property #5417
8508
+ target.$.accessCache[key] = 0;
8475
8509
  }
8476
- else if (descriptor.value != null) {
8510
+ else if (hasOwn(descriptor, 'value')) {
8477
8511
  this.set(target, key, descriptor.value, null);
8478
8512
  }
8479
8513
  return Reflect.defineProperty(target, key, descriptor);
@@ -9009,7 +9043,7 @@ function isMemoSame(cached, memo) {
9009
9043
  }
9010
9044
 
9011
9045
  // Core API ------------------------------------------------------------------
9012
- const version = "3.2.31";
9046
+ const version = "3.2.32";
9013
9047
  const _ssrUtils = {
9014
9048
  createComponentInstance,
9015
9049
  setupComponent,
@@ -427,8 +427,17 @@ function warn(msg, ...args) {
427
427
  let activeEffectScope;
428
428
  class EffectScope {
429
429
  constructor(detached = false) {
430
+ /**
431
+ * @internal
432
+ */
430
433
  this.active = true;
434
+ /**
435
+ * @internal
436
+ */
431
437
  this.effects = [];
438
+ /**
439
+ * @internal
440
+ */
432
441
  this.cleanups = [];
433
442
  if (!detached && activeEffectScope) {
434
443
  this.parent = activeEffectScope;
@@ -438,21 +447,30 @@ class EffectScope {
438
447
  }
439
448
  run(fn) {
440
449
  if (this.active) {
450
+ const currentEffectScope = activeEffectScope;
441
451
  try {
442
452
  activeEffectScope = this;
443
453
  return fn();
444
454
  }
445
455
  finally {
446
- activeEffectScope = this.parent;
456
+ activeEffectScope = currentEffectScope;
447
457
  }
448
458
  }
449
459
  else {
450
460
  warn(`cannot run an inactive effect scope.`);
451
461
  }
452
462
  }
463
+ /**
464
+ * This should only be called on non-detached scopes
465
+ * @internal
466
+ */
453
467
  on() {
454
468
  activeEffectScope = this;
455
469
  }
470
+ /**
471
+ * This should only be called on non-detached scopes
472
+ * @internal
473
+ */
456
474
  off() {
457
475
  activeEffectScope = this.parent;
458
476
  }
@@ -676,9 +694,7 @@ function trackEffects(dep, debuggerEventExtraInfo) {
676
694
  dep.add(activeEffect);
677
695
  activeEffect.deps.push(dep);
678
696
  if (activeEffect.onTrack) {
679
- activeEffect.onTrack(Object.assign({
680
- effect: activeEffect
681
- }, debuggerEventExtraInfo));
697
+ activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo));
682
698
  }
683
699
  }
684
700
  }
@@ -3711,12 +3727,10 @@ function watchEffect(effect, options) {
3711
3727
  return doWatch(effect, null, options);
3712
3728
  }
3713
3729
  function watchPostEffect(effect, options) {
3714
- return doWatch(effect, null, (Object.assign(options || {}, { flush: 'post' })
3715
- ));
3730
+ return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) ));
3716
3731
  }
3717
3732
  function watchSyncEffect(effect, options) {
3718
- return doWatch(effect, null, (Object.assign(options || {}, { flush: 'sync' })
3719
- ));
3733
+ return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) ));
3720
3734
  }
3721
3735
  // initial value for watchers to trigger on undefined initial values
3722
3736
  const INITIAL_WATCHER_VALUE = {};
@@ -4026,7 +4040,9 @@ const BaseTransitionImpl = {
4026
4040
  const { mode } = rawProps;
4027
4041
  // check mode
4028
4042
  if (mode &&
4029
- mode !== 'in-out' && mode !== 'out-in' && mode !== 'default') {
4043
+ mode !== 'in-out' &&
4044
+ mode !== 'out-in' &&
4045
+ mode !== 'default') {
4030
4046
  warn$1(`invalid <transition> mode: ${mode}`);
4031
4047
  }
4032
4048
  // at this point children has a guaranteed length of 1.
@@ -4256,20 +4272,24 @@ function setTransitionHooks(vnode, hooks) {
4256
4272
  vnode.transition = hooks;
4257
4273
  }
4258
4274
  }
4259
- function getTransitionRawChildren(children, keepComment = false) {
4275
+ function getTransitionRawChildren(children, keepComment = false, parentKey) {
4260
4276
  let ret = [];
4261
4277
  let keyedFragmentCount = 0;
4262
4278
  for (let i = 0; i < children.length; i++) {
4263
- const child = children[i];
4279
+ let child = children[i];
4280
+ // #5360 inherit parent key in case of <template v-for>
4281
+ const key = parentKey == null
4282
+ ? child.key
4283
+ : String(parentKey) + String(child.key != null ? child.key : i);
4264
4284
  // handle fragment children case, e.g. v-for
4265
4285
  if (child.type === Fragment) {
4266
4286
  if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
4267
4287
  keyedFragmentCount++;
4268
- ret = ret.concat(getTransitionRawChildren(child.children, keepComment));
4288
+ ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
4269
4289
  }
4270
4290
  // comment placeholders should be skipped, e.g. v-if
4271
4291
  else if (keepComment || child.type !== Comment) {
4272
- ret.push(child);
4292
+ ret.push(key != null ? cloneVNode(child, { key }) : child);
4273
4293
  }
4274
4294
  }
4275
4295
  // #1126 if a transition children list contains multiple sub fragments, these
@@ -5327,6 +5347,10 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
5327
5347
  const propsToUpdate = instance.vnode.dynamicProps;
5328
5348
  for (let i = 0; i < propsToUpdate.length; i++) {
5329
5349
  let key = propsToUpdate[i];
5350
+ // skip if the prop key is a declared emit event listener
5351
+ if (isEmitListener(instance.emitsOptions, key)) {
5352
+ continue;
5353
+ }
5330
5354
  // PROPS flag guarantees rawProps to be non-null
5331
5355
  const value = rawProps[key];
5332
5356
  if (options) {
@@ -5912,7 +5936,8 @@ function withDirectives(vnode, directives) {
5912
5936
  warn$1(`withDirectives can only be used inside render functions.`);
5913
5937
  return vnode;
5914
5938
  }
5915
- const instance = internalInstance.proxy;
5939
+ const instance = getExposeProxy(internalInstance) ||
5940
+ internalInstance.proxy;
5916
5941
  const bindings = vnode.dirs || (vnode.dirs = []);
5917
5942
  for (let i = 0; i < directives.length; i++) {
5918
5943
  let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
@@ -6032,7 +6057,7 @@ function createCompatVue(createApp, createSingletonApp) {
6032
6057
  return vm;
6033
6058
  }
6034
6059
  }
6035
- Vue.version = `2.6.14-compat:${"3.2.31"}`;
6060
+ Vue.version = `2.6.14-compat:${"3.2.32"}`;
6036
6061
  Vue.config = singletonApp.config;
6037
6062
  Vue.use = (p, ...options) => {
6038
6063
  if (p && isFunction(p.install)) {
@@ -6459,6 +6484,9 @@ function createAppContext() {
6459
6484
  let uid = 0;
6460
6485
  function createAppAPI(render, hydrate) {
6461
6486
  return function createApp(rootComponent, rootProps = null) {
6487
+ if (!isFunction(rootComponent)) {
6488
+ rootComponent = Object.assign({}, rootComponent);
6489
+ }
6462
6490
  if (rootProps != null && !isObject(rootProps)) {
6463
6491
  warn$1(`root props passed to app.mount() must be an object.`);
6464
6492
  rootProps = null;
@@ -6658,6 +6686,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
6658
6686
  if (!isArray(existing)) {
6659
6687
  if (_isString) {
6660
6688
  refs[ref] = [refValue];
6689
+ if (hasOwn(setupState, ref)) {
6690
+ setupState[ref] = refs[ref];
6691
+ }
6661
6692
  }
6662
6693
  else {
6663
6694
  ref.value = [refValue];
@@ -7030,7 +7061,7 @@ function startMeasure(instance, type) {
7030
7061
  perf.mark(`vue-${type}-${instance.uid}`);
7031
7062
  }
7032
7063
  {
7033
- devtoolsPerfStart(instance, type, supported ? perf.now() : Date.now());
7064
+ devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
7034
7065
  }
7035
7066
  }
7036
7067
  function endMeasure(instance, type) {
@@ -7043,7 +7074,7 @@ function endMeasure(instance, type) {
7043
7074
  perf.clearMarks(endTag);
7044
7075
  }
7045
7076
  {
7046
- devtoolsPerfEnd(instance, type, supported ? perf.now() : Date.now());
7077
+ devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
7047
7078
  }
7048
7079
  }
7049
7080
  function isSupported() {
@@ -10052,9 +10083,10 @@ const PublicInstanceProxyHandlers = {
10052
10083
  },
10053
10084
  defineProperty(target, key, descriptor) {
10054
10085
  if (descriptor.get != null) {
10055
- this.set(target, key, descriptor.get(), null);
10086
+ // invalidate key cache of a getter based property #5417
10087
+ target.$.accessCache[key] = 0;
10056
10088
  }
10057
- else if (descriptor.value != null) {
10089
+ else if (hasOwn(descriptor, 'value')) {
10058
10090
  this.set(target, key, descriptor.value, null);
10059
10091
  }
10060
10092
  return Reflect.defineProperty(target, key, descriptor);
@@ -10948,7 +10980,7 @@ function isMemoSame(cached, memo) {
10948
10980
  }
10949
10981
 
10950
10982
  // Core API ------------------------------------------------------------------
10951
- const version = "3.2.31";
10983
+ const version = "3.2.32";
10952
10984
  /**
10953
10985
  * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
10954
10986
  * @internal