@vue/runtime-core 3.2.27 → 3.2.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.
@@ -149,7 +149,7 @@ const ErrorTypeStrings = {
149
149
  [12 /* FUNCTION_REF */]: 'ref function',
150
150
  [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader',
151
151
  [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' +
152
- 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/vue-next'
152
+ 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core'
153
153
  };
154
154
  function callWithErrorHandling(fn, instance, type, args) {
155
155
  let res;
@@ -1610,7 +1610,7 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
1610
1610
  if (instance) {
1611
1611
  // #2400
1612
1612
  // to support `app.use` plugins,
1613
- // fallback to appContext's `provides` if the intance is at root
1613
+ // fallback to appContext's `provides` if the instance is at root
1614
1614
  const provides = instance.parent == null
1615
1615
  ? instance.vnode.appContext && instance.vnode.appContext.provides
1616
1616
  : instance.parent.provides;
@@ -1676,7 +1676,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
1676
1676
  let isMultiSource = false;
1677
1677
  if (reactivity.isRef(source)) {
1678
1678
  getter = () => source.value;
1679
- forceTrigger = !!source._shallow;
1679
+ forceTrigger = reactivity.isShallow(source);
1680
1680
  }
1681
1681
  else if (reactivity.isReactive(source)) {
1682
1682
  getter = () => source;
@@ -2568,7 +2568,7 @@ function matches(pattern, name) {
2568
2568
  return pattern.some((p) => matches(p, name));
2569
2569
  }
2570
2570
  else if (shared.isString(pattern)) {
2571
- return pattern.split(',').indexOf(name) > -1;
2571
+ return pattern.split(',').includes(name);
2572
2572
  }
2573
2573
  else if (pattern.test) {
2574
2574
  return pattern.test(name);
@@ -2821,7 +2821,7 @@ function applyOptions(instance) {
2821
2821
  warn(`Write operation failed: computed property "${key}" is readonly.`);
2822
2822
  }
2823
2823
  ;
2824
- const c = reactivity.computed({
2824
+ const c = computed({
2825
2825
  get,
2826
2826
  set
2827
2827
  });
@@ -3220,7 +3220,9 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
3220
3220
  // attrs point to the same object so it should already have been updated.
3221
3221
  if (attrs !== rawCurrentProps) {
3222
3222
  for (const key in attrs) {
3223
- if (!rawProps || !shared.hasOwn(rawProps, key)) {
3223
+ if (!rawProps ||
3224
+ (!shared.hasOwn(rawProps, key) &&
3225
+ (!false ))) {
3224
3226
  delete attrs[key];
3225
3227
  hasAttrsChanged = true;
3226
3228
  }
@@ -3670,9 +3672,8 @@ return withDirectives(h(comp), [
3670
3672
  [bar, this.y]
3671
3673
  ])
3672
3674
  */
3673
- const isBuiltInDirective = /*#__PURE__*/ shared.makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
3674
3675
  function validateDirectiveName(name) {
3675
- if (isBuiltInDirective(name)) {
3676
+ if (shared.isBuiltInDirective(name)) {
3676
3677
  warn('Do not use built-in directive ids as custom directive id: ' + name);
3677
3678
  }
3678
3679
  }
@@ -4151,7 +4152,8 @@ function createHydrationFunctions(rendererInternals) {
4151
4152
  // e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
4152
4153
  const forcePatchValue = (type === 'input' && dirs) || type === 'option';
4153
4154
  // skip props & children if this is hoisted static nodes
4154
- if (forcePatchValue || patchFlag !== -1 /* HOISTED */) {
4155
+ // #5405 in dev, always hydrate children for HMR
4156
+ {
4155
4157
  if (dirs) {
4156
4158
  invokeDirectiveHook(vnode, null, parentComponent, 'created');
4157
4159
  }
@@ -4316,6 +4318,7 @@ function createHydrationFunctions(rendererInternals) {
4316
4318
  return [hydrate, hydrateNode];
4317
4319
  }
4318
4320
 
4321
+ /* eslint-disable no-restricted-globals */
4319
4322
  let supported;
4320
4323
  let perf;
4321
4324
  function startMeasure(instance, type) {
@@ -4343,7 +4346,6 @@ function isSupported() {
4343
4346
  if (supported !== undefined) {
4344
4347
  return supported;
4345
4348
  }
4346
- /* eslint-disable no-restricted-globals */
4347
4349
  if (typeof window !== 'undefined' && window.performance) {
4348
4350
  supported = true;
4349
4351
  perf = window.performance;
@@ -4351,7 +4353,6 @@ function isSupported() {
4351
4353
  else {
4352
4354
  supported = false;
4353
4355
  }
4354
- /* eslint-enable no-restricted-globals */
4355
4356
  return supported;
4356
4357
  }
4357
4358
 
@@ -6228,7 +6229,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
6228
6229
  shapeFlag: vnode.shapeFlag,
6229
6230
  // if the vnode is cloned with extra props, we can no longer assume its
6230
6231
  // existing patch flag to be reliable and need to add the FULL_PROPS flag.
6231
- // note: perserve flag for fragments since they use the flag for children
6232
+ // note: preserve flag for fragments since they use the flag for children
6232
6233
  // fast paths only.
6233
6234
  patchFlag: extraProps && vnode.type !== Fragment
6234
6235
  ? patchFlag === -1 // hoisted node
@@ -6390,7 +6391,8 @@ function mergeProps(...args) {
6390
6391
  else if (shared.isOn(key)) {
6391
6392
  const existing = ret[key];
6392
6393
  const incoming = toMerge[key];
6393
- if (existing !== incoming &&
6394
+ if (incoming &&
6395
+ existing !== incoming &&
6394
6396
  !(shared.isArray(existing) && existing.includes(incoming))) {
6395
6397
  ret[key] = existing
6396
6398
  ? [].concat(existing, incoming)
@@ -6685,9 +6687,11 @@ const PublicInstanceProxyHandlers = {
6685
6687
  const { data, setupState, ctx } = instance;
6686
6688
  if (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) {
6687
6689
  setupState[key] = value;
6690
+ return true;
6688
6691
  }
6689
6692
  else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) {
6690
6693
  data[key] = value;
6694
+ return true;
6691
6695
  }
6692
6696
  else if (shared.hasOwn(instance.props, key)) {
6693
6697
  warn(`Attempting to mutate prop "${key}". Props are readonly.`, instance);
@@ -6721,6 +6725,15 @@ const PublicInstanceProxyHandlers = {
6721
6725
  shared.hasOwn(ctx, key) ||
6722
6726
  shared.hasOwn(publicPropertiesMap, key) ||
6723
6727
  shared.hasOwn(appContext.config.globalProperties, key));
6728
+ },
6729
+ defineProperty(target, key, descriptor) {
6730
+ if (descriptor.get != null) {
6731
+ this.set(target, key, descriptor.get(), null);
6732
+ }
6733
+ else if (descriptor.value != null) {
6734
+ this.set(target, key, descriptor.value, null);
6735
+ }
6736
+ return Reflect.defineProperty(target, key, descriptor);
6724
6737
  }
6725
6738
  };
6726
6739
  {
@@ -7214,7 +7227,7 @@ function defineEmits() {
7214
7227
  * instance properties when it is accessed by a parent component via template
7215
7228
  * refs.
7216
7229
  *
7217
- * `<script setup>` components are closed by default - i.e. varaibles inside
7230
+ * `<script setup>` components are closed by default - i.e. variables inside
7218
7231
  * the `<script setup>` scope is not exposed to parent unless explicitly exposed
7219
7232
  * via `defineExpose`.
7220
7233
  *
@@ -7383,6 +7396,10 @@ const useSSRContext = () => {
7383
7396
  }
7384
7397
  };
7385
7398
 
7399
+ function isShallow(value) {
7400
+ return !!(value && value["__v_isShallow" /* IS_SHALLOW */]);
7401
+ }
7402
+
7386
7403
  function initCustomFormatter() {
7387
7404
  /* eslint-disable no-restricted-globals */
7388
7405
  if (typeof window === 'undefined') {
@@ -7417,7 +7434,7 @@ function initCustomFormatter() {
7417
7434
  return [
7418
7435
  'div',
7419
7436
  {},
7420
- ['span', vueStyle, 'Reactive'],
7437
+ ['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'],
7421
7438
  '<',
7422
7439
  formatValue(obj),
7423
7440
  `>${reactivity.isReadonly(obj) ? ` (readonly)` : ``}`
@@ -7427,7 +7444,7 @@ function initCustomFormatter() {
7427
7444
  return [
7428
7445
  'div',
7429
7446
  {},
7430
- ['span', vueStyle, 'Readonly'],
7447
+ ['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'],
7431
7448
  '<',
7432
7449
  formatValue(obj),
7433
7450
  '>'
@@ -7556,7 +7573,7 @@ function initCustomFormatter() {
7556
7573
  }
7557
7574
  }
7558
7575
  function genRefFlag(v) {
7559
- if (v._shallow) {
7576
+ if (isShallow(v)) {
7560
7577
  return `ShallowRef`;
7561
7578
  }
7562
7579
  if (v.effect) {
@@ -7600,7 +7617,7 @@ function isMemoSame(cached, memo) {
7600
7617
  }
7601
7618
 
7602
7619
  // Core API ------------------------------------------------------------------
7603
- const version = "3.2.27";
7620
+ const version = "3.2.31";
7604
7621
  const _ssrUtils = {
7605
7622
  createComponentInstance,
7606
7623
  setupComponent,
@@ -7633,6 +7650,7 @@ exports.isProxy = reactivity.isProxy;
7633
7650
  exports.isReactive = reactivity.isReactive;
7634
7651
  exports.isReadonly = reactivity.isReadonly;
7635
7652
  exports.isRef = reactivity.isRef;
7653
+ exports.isShallow = reactivity.isShallow;
7636
7654
  exports.markRaw = reactivity.markRaw;
7637
7655
  exports.onScopeDispose = reactivity.onScopeDispose;
7638
7656
  exports.proxyRefs = reactivity.proxyRefs;
@@ -1170,7 +1170,7 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
1170
1170
  if (instance) {
1171
1171
  // #2400
1172
1172
  // to support `app.use` plugins,
1173
- // fallback to appContext's `provides` if the intance is at root
1173
+ // fallback to appContext's `provides` if the instance is at root
1174
1174
  const provides = instance.parent == null
1175
1175
  ? instance.vnode.appContext && instance.vnode.appContext.provides
1176
1176
  : instance.parent.provides;
@@ -1210,7 +1210,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
1210
1210
  let isMultiSource = false;
1211
1211
  if (reactivity.isRef(source)) {
1212
1212
  getter = () => source.value;
1213
- forceTrigger = !!source._shallow;
1213
+ forceTrigger = reactivity.isShallow(source);
1214
1214
  }
1215
1215
  else if (reactivity.isReactive(source)) {
1216
1216
  getter = () => source;
@@ -2064,7 +2064,7 @@ function matches(pattern, name) {
2064
2064
  return pattern.some((p) => matches(p, name));
2065
2065
  }
2066
2066
  else if (shared.isString(pattern)) {
2067
- return pattern.split(',').indexOf(name) > -1;
2067
+ return pattern.split(',').includes(name);
2068
2068
  }
2069
2069
  else if (pattern.test) {
2070
2070
  return pattern.test(name);
@@ -2246,7 +2246,7 @@ function applyOptions(instance) {
2246
2246
  const set = !shared.isFunction(opt) && shared.isFunction(opt.set)
2247
2247
  ? opt.set.bind(publicThis)
2248
2248
  : shared.NOOP;
2249
- const c = reactivity.computed({
2249
+ const c = computed({
2250
2250
  get,
2251
2251
  set
2252
2252
  });
@@ -2615,7 +2615,9 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
2615
2615
  // attrs point to the same object so it should already have been updated.
2616
2616
  if (attrs !== rawCurrentProps) {
2617
2617
  for (const key in attrs) {
2618
- if (!rawProps || !shared.hasOwn(rawProps, key)) {
2618
+ if (!rawProps ||
2619
+ (!shared.hasOwn(rawProps, key) &&
2620
+ (!false ))) {
2619
2621
  delete attrs[key];
2620
2622
  hasAttrsChanged = true;
2621
2623
  }
@@ -3309,6 +3311,7 @@ function createHydrationFunctions(rendererInternals) {
3309
3311
  // e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
3310
3312
  const forcePatchValue = (type === 'input' && dirs) || type === 'option';
3311
3313
  // skip props & children if this is hoisted static nodes
3314
+ // #5405 in dev, always hydrate children for HMR
3312
3315
  if (forcePatchValue || patchFlag !== -1 /* HOISTED */) {
3313
3316
  if (dirs) {
3314
3317
  invokeDirectiveHook(vnode, null, parentComponent, 'created');
@@ -5117,7 +5120,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
5117
5120
  shapeFlag: vnode.shapeFlag,
5118
5121
  // if the vnode is cloned with extra props, we can no longer assume its
5119
5122
  // existing patch flag to be reliable and need to add the FULL_PROPS flag.
5120
- // note: perserve flag for fragments since they use the flag for children
5123
+ // note: preserve flag for fragments since they use the flag for children
5121
5124
  // fast paths only.
5122
5125
  patchFlag: extraProps && vnode.type !== Fragment
5123
5126
  ? patchFlag === -1 // hoisted node
@@ -5268,7 +5271,8 @@ function mergeProps(...args) {
5268
5271
  else if (shared.isOn(key)) {
5269
5272
  const existing = ret[key];
5270
5273
  const incoming = toMerge[key];
5271
- if (existing !== incoming &&
5274
+ if (incoming &&
5275
+ existing !== incoming &&
5272
5276
  !(shared.isArray(existing) && existing.includes(incoming))) {
5273
5277
  ret[key] = existing
5274
5278
  ? [].concat(existing, incoming)
@@ -5520,9 +5524,11 @@ const PublicInstanceProxyHandlers = {
5520
5524
  const { data, setupState, ctx } = instance;
5521
5525
  if (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) {
5522
5526
  setupState[key] = value;
5527
+ return true;
5523
5528
  }
5524
5529
  else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) {
5525
5530
  data[key] = value;
5531
+ return true;
5526
5532
  }
5527
5533
  else if (shared.hasOwn(instance.props, key)) {
5528
5534
  return false;
@@ -5546,6 +5552,15 @@ const PublicInstanceProxyHandlers = {
5546
5552
  shared.hasOwn(ctx, key) ||
5547
5553
  shared.hasOwn(publicPropertiesMap, key) ||
5548
5554
  shared.hasOwn(appContext.config.globalProperties, key));
5555
+ },
5556
+ defineProperty(target, key, descriptor) {
5557
+ if (descriptor.get != null) {
5558
+ this.set(target, key, descriptor.get(), null);
5559
+ }
5560
+ else if (descriptor.value != null) {
5561
+ this.set(target, key, descriptor.value, null);
5562
+ }
5563
+ return Reflect.defineProperty(target, key, descriptor);
5549
5564
  }
5550
5565
  };
5551
5566
  const RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ shared.extend({}, PublicInstanceProxyHandlers, {
@@ -5877,7 +5892,7 @@ function defineEmits() {
5877
5892
  * instance properties when it is accessed by a parent component via template
5878
5893
  * refs.
5879
5894
  *
5880
- * `<script setup>` components are closed by default - i.e. varaibles inside
5895
+ * `<script setup>` components are closed by default - i.e. variables inside
5881
5896
  * the `<script setup>` scope is not exposed to parent unless explicitly exposed
5882
5897
  * via `defineExpose`.
5883
5898
  *
@@ -6066,7 +6081,7 @@ function isMemoSame(cached, memo) {
6066
6081
  }
6067
6082
 
6068
6083
  // Core API ------------------------------------------------------------------
6069
- const version = "3.2.27";
6084
+ const version = "3.2.31";
6070
6085
  const _ssrUtils = {
6071
6086
  createComponentInstance,
6072
6087
  setupComponent,
@@ -6099,6 +6114,7 @@ exports.isProxy = reactivity.isProxy;
6099
6114
  exports.isReactive = reactivity.isReactive;
6100
6115
  exports.isReadonly = reactivity.isReadonly;
6101
6116
  exports.isRef = reactivity.isRef;
6117
+ exports.isShallow = reactivity.isShallow;
6102
6118
  exports.markRaw = reactivity.markRaw;
6103
6119
  exports.onScopeDispose = reactivity.onScopeDispose;
6104
6120
  exports.proxyRefs = reactivity.proxyRefs;
@@ -21,6 +21,7 @@ import { isProxy } from '@vue/reactivity';
21
21
  import { isReactive } from '@vue/reactivity';
22
22
  import { isReadonly } from '@vue/reactivity';
23
23
  import { isRef } from '@vue/reactivity';
24
+ import { isShallow } from '@vue/reactivity';
24
25
  import { LooseRequired } from '@vue/shared';
25
26
  import { markRaw } from '@vue/reactivity';
26
27
  import { normalizeClass } from '@vue/shared';
@@ -688,7 +689,7 @@ export declare function defineEmits<TypeEmit>(): TypeEmit;
688
689
  * instance properties when it is accessed by a parent component via template
689
690
  * refs.
690
691
  *
691
- * `<script setup>` components are closed by default - i.e. varaibles inside
692
+ * `<script setup>` components are closed by default - i.e. variables inside
692
693
  * the `<script setup>` scope is not exposed to parent unless explicitly exposed
693
694
  * via `defineExpose`.
694
695
  *
@@ -1016,6 +1017,8 @@ export { isRef }
1016
1017
 
1017
1018
  export declare const isRuntimeOnly: () => boolean;
1018
1019
 
1020
+ export { isShallow }
1021
+
1019
1022
  export declare function isVNode(value: any): value is VNode;
1020
1023
 
1021
1024
  export declare const KeepAlive: {
@@ -1038,22 +1041,22 @@ export declare type LegacyConfig = {
1038
1041
  silent?: boolean;
1039
1042
  /**
1040
1043
  * @deprecated use __VUE_PROD_DEVTOOLS__ compile-time feature flag instead
1041
- * https://github.com/vuejs/vue-next/tree/master/packages/vue#bundler-build-feature-flags
1044
+ * https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags
1042
1045
  */
1043
1046
  devtools?: boolean;
1044
1047
  /**
1045
1048
  * @deprecated use `config.isCustomElement` instead
1046
- * https://v3.vuejs.org/guide/migration/global-api.html#config-ignoredelements-is-now-config-iscustomelement
1049
+ * https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement
1047
1050
  */
1048
1051
  ignoredElements?: (string | RegExp)[];
1049
1052
  /**
1050
1053
  * @deprecated
1051
- * https://v3.vuejs.org/guide/migration/keycode-modifiers.html
1054
+ * https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html
1052
1055
  */
1053
1056
  keyCodes?: Record<string, number | number[]>;
1054
1057
  /**
1055
1058
  * @deprecated
1056
- * https://v3.vuejs.org/guide/migration/global-api.html#config-productiontip-removed
1059
+ * https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed
1057
1060
  */
1058
1061
  productionTip?: boolean;
1059
1062
  };
@@ -1,6 +1,6 @@
1
- import { pauseTracking, resetTracking, isRef, toRaw, isReactive, ReactiveEffect, ref, reactive, computed as computed$1, shallowReactive, trigger, isProxy, shallowReadonly, track, EffectScope, markRaw, proxyRefs, isReadonly } from '@vue/reactivity';
2
- export { EffectScope, ReactiveEffect, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, triggerRef, unref } from '@vue/reactivity';
3
- import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, toNumber, hyphenate, camelize, isOn, hasOwn, isModelListener, hasChanged, remove, isObject, isSet, isMap, isPlainObject, invokeArrayFns, def, isReservedProp, EMPTY_ARR, capitalize, toRawType, makeMap, NO, normalizeClass, normalizeStyle, isGloballyWhitelisted } from '@vue/shared';
1
+ import { pauseTracking, resetTracking, isRef, toRaw, isShallow as isShallow$1, isReactive, ReactiveEffect, ref, reactive, shallowReactive, trigger, isProxy, shallowReadonly, track, EffectScope, markRaw, proxyRefs, computed as computed$1, isReadonly } from '@vue/reactivity';
2
+ export { EffectScope, ReactiveEffect, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, triggerRef, unref } from '@vue/reactivity';
3
+ import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, toNumber, hyphenate, camelize, isOn, hasOwn, isModelListener, hasChanged, remove, isObject, isSet, isMap, isPlainObject, invokeArrayFns, def, isReservedProp, EMPTY_ARR, capitalize, toRawType, makeMap, isBuiltInDirective, NO, normalizeClass, normalizeStyle, isGloballyWhitelisted } from '@vue/shared';
4
4
  export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
5
5
 
6
6
  const stack = [];
@@ -147,7 +147,7 @@ const ErrorTypeStrings = {
147
147
  [12 /* FUNCTION_REF */]: 'ref function',
148
148
  [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader',
149
149
  [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' +
150
- 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/vue-next'
150
+ 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core'
151
151
  };
152
152
  function callWithErrorHandling(fn, instance, type, args) {
153
153
  let res;
@@ -1617,7 +1617,7 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
1617
1617
  if (instance) {
1618
1618
  // #2400
1619
1619
  // to support `app.use` plugins,
1620
- // fallback to appContext's `provides` if the intance is at root
1620
+ // fallback to appContext's `provides` if the instance is at root
1621
1621
  const provides = instance.parent == null
1622
1622
  ? instance.vnode.appContext && instance.vnode.appContext.provides
1623
1623
  : instance.parent.provides;
@@ -1685,7 +1685,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
1685
1685
  let isMultiSource = false;
1686
1686
  if (isRef(source)) {
1687
1687
  getter = () => source.value;
1688
- forceTrigger = !!source._shallow;
1688
+ forceTrigger = isShallow$1(source);
1689
1689
  }
1690
1690
  else if (isReactive(source)) {
1691
1691
  getter = () => source;
@@ -2578,7 +2578,7 @@ function matches(pattern, name) {
2578
2578
  return pattern.some((p) => matches(p, name));
2579
2579
  }
2580
2580
  else if (isString(pattern)) {
2581
- return pattern.split(',').indexOf(name) > -1;
2581
+ return pattern.split(',').includes(name);
2582
2582
  }
2583
2583
  else if (pattern.test) {
2584
2584
  return pattern.test(name);
@@ -2835,7 +2835,7 @@ function applyOptions(instance) {
2835
2835
  warn(`Write operation failed: computed property "${key}" is readonly.`);
2836
2836
  }
2837
2837
  : NOOP;
2838
- const c = computed$1({
2838
+ const c = computed({
2839
2839
  get,
2840
2840
  set
2841
2841
  });
@@ -3236,7 +3236,9 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
3236
3236
  // attrs point to the same object so it should already have been updated.
3237
3237
  if (attrs !== rawCurrentProps) {
3238
3238
  for (const key in attrs) {
3239
- if (!rawProps || !hasOwn(rawProps, key)) {
3239
+ if (!rawProps ||
3240
+ (!hasOwn(rawProps, key) &&
3241
+ (!false ))) {
3240
3242
  delete attrs[key];
3241
3243
  hasAttrsChanged = true;
3242
3244
  }
@@ -3688,7 +3690,6 @@ return withDirectives(h(comp), [
3688
3690
  [bar, this.y]
3689
3691
  ])
3690
3692
  */
3691
- const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
3692
3693
  function validateDirectiveName(name) {
3693
3694
  if (isBuiltInDirective(name)) {
3694
3695
  warn('Do not use built-in directive ids as custom directive id: ' + name);
@@ -4174,7 +4175,8 @@ function createHydrationFunctions(rendererInternals) {
4174
4175
  // e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
4175
4176
  const forcePatchValue = (type === 'input' && dirs) || type === 'option';
4176
4177
  // skip props & children if this is hoisted static nodes
4177
- if (forcePatchValue || patchFlag !== -1 /* HOISTED */) {
4178
+ // #5405 in dev, always hydrate children for HMR
4179
+ if ((process.env.NODE_ENV !== 'production') || forcePatchValue || patchFlag !== -1 /* HOISTED */) {
4178
4180
  if (dirs) {
4179
4181
  invokeDirectiveHook(vnode, null, parentComponent, 'created');
4180
4182
  }
@@ -4341,6 +4343,7 @@ function createHydrationFunctions(rendererInternals) {
4341
4343
  return [hydrate, hydrateNode];
4342
4344
  }
4343
4345
 
4346
+ /* eslint-disable no-restricted-globals */
4344
4347
  let supported;
4345
4348
  let perf;
4346
4349
  function startMeasure(instance, type) {
@@ -4368,7 +4371,6 @@ function isSupported() {
4368
4371
  if (supported !== undefined) {
4369
4372
  return supported;
4370
4373
  }
4371
- /* eslint-disable no-restricted-globals */
4372
4374
  if (typeof window !== 'undefined' && window.performance) {
4373
4375
  supported = true;
4374
4376
  perf = window.performance;
@@ -4376,7 +4378,6 @@ function isSupported() {
4376
4378
  else {
4377
4379
  supported = false;
4378
4380
  }
4379
- /* eslint-enable no-restricted-globals */
4380
4381
  return supported;
4381
4382
  }
4382
4383
 
@@ -6300,7 +6301,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
6300
6301
  shapeFlag: vnode.shapeFlag,
6301
6302
  // if the vnode is cloned with extra props, we can no longer assume its
6302
6303
  // existing patch flag to be reliable and need to add the FULL_PROPS flag.
6303
- // note: perserve flag for fragments since they use the flag for children
6304
+ // note: preserve flag for fragments since they use the flag for children
6304
6305
  // fast paths only.
6305
6306
  patchFlag: extraProps && vnode.type !== Fragment
6306
6307
  ? patchFlag === -1 // hoisted node
@@ -6462,7 +6463,8 @@ function mergeProps(...args) {
6462
6463
  else if (isOn(key)) {
6463
6464
  const existing = ret[key];
6464
6465
  const incoming = toMerge[key];
6465
- if (existing !== incoming &&
6466
+ if (incoming &&
6467
+ existing !== incoming &&
6466
6468
  !(isArray(existing) && existing.includes(incoming))) {
6467
6469
  ret[key] = existing
6468
6470
  ? [].concat(existing, incoming)
@@ -6759,9 +6761,11 @@ const PublicInstanceProxyHandlers = {
6759
6761
  const { data, setupState, ctx } = instance;
6760
6762
  if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
6761
6763
  setupState[key] = value;
6764
+ return true;
6762
6765
  }
6763
6766
  else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
6764
6767
  data[key] = value;
6768
+ return true;
6765
6769
  }
6766
6770
  else if (hasOwn(instance.props, key)) {
6767
6771
  (process.env.NODE_ENV !== 'production') &&
@@ -6797,6 +6801,15 @@ const PublicInstanceProxyHandlers = {
6797
6801
  hasOwn(ctx, key) ||
6798
6802
  hasOwn(publicPropertiesMap, key) ||
6799
6803
  hasOwn(appContext.config.globalProperties, key));
6804
+ },
6805
+ defineProperty(target, key, descriptor) {
6806
+ if (descriptor.get != null) {
6807
+ this.set(target, key, descriptor.get(), null);
6808
+ }
6809
+ else if (descriptor.value != null) {
6810
+ this.set(target, key, descriptor.value, null);
6811
+ }
6812
+ return Reflect.defineProperty(target, key, descriptor);
6800
6813
  }
6801
6814
  };
6802
6815
  if ((process.env.NODE_ENV !== 'production') && !false) {
@@ -7310,7 +7323,7 @@ function defineEmits() {
7310
7323
  * instance properties when it is accessed by a parent component via template
7311
7324
  * refs.
7312
7325
  *
7313
- * `<script setup>` components are closed by default - i.e. varaibles inside
7326
+ * `<script setup>` components are closed by default - i.e. variables inside
7314
7327
  * the `<script setup>` scope is not exposed to parent unless explicitly exposed
7315
7328
  * via `defineExpose`.
7316
7329
  *
@@ -7479,6 +7492,10 @@ const useSSRContext = () => {
7479
7492
  }
7480
7493
  };
7481
7494
 
7495
+ function isShallow(value) {
7496
+ return !!(value && value["__v_isShallow" /* IS_SHALLOW */]);
7497
+ }
7498
+
7482
7499
  function initCustomFormatter() {
7483
7500
  /* eslint-disable no-restricted-globals */
7484
7501
  if (!(process.env.NODE_ENV !== 'production') || typeof window === 'undefined') {
@@ -7513,7 +7530,7 @@ function initCustomFormatter() {
7513
7530
  return [
7514
7531
  'div',
7515
7532
  {},
7516
- ['span', vueStyle, 'Reactive'],
7533
+ ['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'],
7517
7534
  '<',
7518
7535
  formatValue(obj),
7519
7536
  `>${isReadonly(obj) ? ` (readonly)` : ``}`
@@ -7523,7 +7540,7 @@ function initCustomFormatter() {
7523
7540
  return [
7524
7541
  'div',
7525
7542
  {},
7526
- ['span', vueStyle, 'Readonly'],
7543
+ ['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'],
7527
7544
  '<',
7528
7545
  formatValue(obj),
7529
7546
  '>'
@@ -7652,7 +7669,7 @@ function initCustomFormatter() {
7652
7669
  }
7653
7670
  }
7654
7671
  function genRefFlag(v) {
7655
- if (v._shallow) {
7672
+ if (isShallow(v)) {
7656
7673
  return `ShallowRef`;
7657
7674
  }
7658
7675
  if (v.effect) {
@@ -7696,7 +7713,7 @@ function isMemoSame(cached, memo) {
7696
7713
  }
7697
7714
 
7698
7715
  // Core API ------------------------------------------------------------------
7699
- const version = "3.2.27";
7716
+ const version = "3.2.31";
7700
7717
  const _ssrUtils = {
7701
7718
  createComponentInstance,
7702
7719
  setupComponent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.2.27",
3
+ "version": "3.2.31",
4
4
  "description": "@vue/runtime-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/runtime-core.esm-bundler.js",
@@ -19,7 +19,7 @@
19
19
  "sideEffects": false,
20
20
  "repository": {
21
21
  "type": "git",
22
- "url": "git+https://github.com/vuejs/vue-next.git",
22
+ "url": "git+https://github.com/vuejs/core.git",
23
23
  "directory": "packages/runtime-core"
24
24
  },
25
25
  "keywords": [
@@ -28,11 +28,11 @@
28
28
  "author": "Evan You",
29
29
  "license": "MIT",
30
30
  "bugs": {
31
- "url": "https://github.com/vuejs/vue-next/issues"
31
+ "url": "https://github.com/vuejs/core/issues"
32
32
  },
33
- "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/runtime-core#readme",
33
+ "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
34
34
  "dependencies": {
35
- "@vue/shared": "3.2.27",
36
- "@vue/reactivity": "3.2.27"
35
+ "@vue/shared": "3.2.31",
36
+ "@vue/reactivity": "3.2.31"
37
37
  }
38
38
  }