@vue/runtime-core 3.2.20 → 3.2.24

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.
@@ -147,22 +147,33 @@ function tryWrap(fn) {
147
147
  }
148
148
 
149
149
  let buffer = [];
150
+ let devtoolsNotInstalled = false;
150
151
  function emit(event, ...args) {
151
152
  if (exports.devtools) {
152
153
  exports.devtools.emit(event, ...args);
153
154
  }
154
- else {
155
+ else if (!devtoolsNotInstalled) {
155
156
  buffer.push({ event, args });
156
157
  }
157
158
  }
158
159
  function setDevtoolsHook(hook, target) {
160
+ var _a, _b;
159
161
  exports.devtools = hook;
160
162
  if (exports.devtools) {
161
163
  exports.devtools.enabled = true;
162
164
  buffer.forEach(({ event, args }) => exports.devtools.emit(event, ...args));
163
165
  buffer = [];
164
166
  }
165
- else {
167
+ else if (
168
+ // handle late devtools injection - only do this if we are in an actual
169
+ // browser environment to avoid the timer handle stalling test runner exit
170
+ // (#4815)
171
+ // eslint-disable-next-line no-restricted-globals
172
+ typeof window !== 'undefined' &&
173
+ // some envs mock window but not fully
174
+ window.HTMLElement &&
175
+ // also exclude jsdom
176
+ !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) {
166
177
  const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
167
178
  target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
168
179
  replay.push((newHook) => {
@@ -171,9 +182,18 @@ function setDevtoolsHook(hook, target) {
171
182
  // clear buffer after 3s - the user probably doesn't have devtools installed
172
183
  // at all, and keeping the buffer will cause memory leaks (#4738)
173
184
  setTimeout(() => {
174
- buffer = [];
185
+ if (!exports.devtools) {
186
+ target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
187
+ devtoolsNotInstalled = true;
188
+ buffer = [];
189
+ }
175
190
  }, 3000);
176
191
  }
192
+ else {
193
+ // non-browser env, assume not installed
194
+ devtoolsNotInstalled = true;
195
+ buffer = [];
196
+ }
177
197
  }
178
198
  function devtoolsInitApp(app, version) {
179
199
  emit("app:init" /* APP_INIT */, app, version, {
@@ -1247,7 +1267,8 @@ const BaseTransitionImpl = {
1247
1267
  const rawProps = reactivity.toRaw(props);
1248
1268
  const { mode } = rawProps;
1249
1269
  // check mode
1250
- if (mode && !['in-out', 'out-in', 'default'].includes(mode)) {
1270
+ if (mode &&
1271
+ mode !== 'in-out' && mode !== 'out-in' && mode !== 'default') {
1251
1272
  warn(`invalid <transition> mode: ${mode}`);
1252
1273
  }
1253
1274
  // at this point children has a guaranteed length of 1.
@@ -1887,7 +1908,7 @@ function registerKeepAliveHook(hook, type, target = currentInstance) {
1887
1908
  }
1888
1909
  current = current.parent;
1889
1910
  }
1890
- hook();
1911
+ return hook();
1891
1912
  });
1892
1913
  injectHook(type, wrappedHook, target);
1893
1914
  // In addition to registering it on the target instance, we walk up the parent
@@ -2549,7 +2570,7 @@ function setFullProps(instance, rawProps, props, attrs) {
2549
2570
  }
2550
2571
  }
2551
2572
  else if (!isEmitListener(instance.emitsOptions, key)) {
2552
- if (value !== attrs[key]) {
2573
+ if (!(key in attrs) || value !== attrs[key]) {
2553
2574
  attrs[key] = value;
2554
2575
  hasAttrsChanged = true;
2555
2576
  }
@@ -2961,7 +2982,7 @@ return withDirectives(h(comp), [
2961
2982
  [bar, this.y]
2962
2983
  ])
2963
2984
  */
2964
- const isBuiltInDirective = /*#__PURE__*/ shared.makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text');
2985
+ const isBuiltInDirective = /*#__PURE__*/ shared.makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
2965
2986
  function validateDirectiveName(name) {
2966
2987
  if (isBuiltInDirective(name)) {
2967
2988
  warn('Do not use built-in directive ids as custom directive id: ' + name);
@@ -4878,8 +4899,8 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
4878
4899
  *
4879
4900
  * #2080
4880
4901
  * Inside keyed `template` fragment static children, if a fragment is moved,
4881
- * the children will always moved so that need inherit el form previous nodes
4882
- * to ensure correct moved position.
4902
+ * the children will always be moved. Therefore, in order to ensure correct move
4903
+ * position, el should be inherited from previous nodes.
4883
4904
  */
4884
4905
  function traverseStaticChildren(n1, n2, shallow = false) {
4885
4906
  const ch1 = n1.children;
@@ -5659,7 +5680,8 @@ function mergeProps(...args) {
5659
5680
  else if (shared.isOn(key)) {
5660
5681
  const existing = ret[key];
5661
5682
  const incoming = toMerge[key];
5662
- if (existing !== incoming) {
5683
+ if (existing !== incoming &&
5684
+ !(shared.isArray(existing) && existing.includes(incoming))) {
5663
5685
  ret[key] = existing
5664
5686
  ? [].concat(existing, incoming)
5665
5687
  : incoming;
@@ -5862,23 +5884,23 @@ const PublicInstanceProxyHandlers = {
5862
5884
  const n = accessCache[key];
5863
5885
  if (n !== undefined) {
5864
5886
  switch (n) {
5865
- case 0 /* SETUP */:
5887
+ case 1 /* SETUP */:
5866
5888
  return setupState[key];
5867
- case 1 /* DATA */:
5889
+ case 2 /* DATA */:
5868
5890
  return data[key];
5869
- case 3 /* CONTEXT */:
5891
+ case 4 /* CONTEXT */:
5870
5892
  return ctx[key];
5871
- case 2 /* PROPS */:
5893
+ case 3 /* PROPS */:
5872
5894
  return props[key];
5873
5895
  // default: just fallthrough
5874
5896
  }
5875
5897
  }
5876
5898
  else if (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) {
5877
- accessCache[key] = 0 /* SETUP */;
5899
+ accessCache[key] = 1 /* SETUP */;
5878
5900
  return setupState[key];
5879
5901
  }
5880
5902
  else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) {
5881
- accessCache[key] = 1 /* DATA */;
5903
+ accessCache[key] = 2 /* DATA */;
5882
5904
  return data[key];
5883
5905
  }
5884
5906
  else if (
@@ -5886,15 +5908,15 @@ const PublicInstanceProxyHandlers = {
5886
5908
  // props
5887
5909
  (normalizedProps = instance.propsOptions[0]) &&
5888
5910
  shared.hasOwn(normalizedProps, key)) {
5889
- accessCache[key] = 2 /* PROPS */;
5911
+ accessCache[key] = 3 /* PROPS */;
5890
5912
  return props[key];
5891
5913
  }
5892
5914
  else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) {
5893
- accessCache[key] = 3 /* CONTEXT */;
5915
+ accessCache[key] = 4 /* CONTEXT */;
5894
5916
  return ctx[key];
5895
5917
  }
5896
5918
  else if (shouldCacheAccess) {
5897
- accessCache[key] = 4 /* OTHER */;
5919
+ accessCache[key] = 0 /* OTHER */;
5898
5920
  }
5899
5921
  }
5900
5922
  const publicGetter = publicPropertiesMap[key];
@@ -5915,7 +5937,7 @@ const PublicInstanceProxyHandlers = {
5915
5937
  }
5916
5938
  else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) {
5917
5939
  // user may set custom properties to `this` that start with `$`
5918
- accessCache[key] = 3 /* CONTEXT */;
5940
+ accessCache[key] = 4 /* CONTEXT */;
5919
5941
  return ctx[key];
5920
5942
  }
5921
5943
  else if (
@@ -5976,7 +5998,7 @@ const PublicInstanceProxyHandlers = {
5976
5998
  },
5977
5999
  has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
5978
6000
  let normalizedProps;
5979
- return (accessCache[key] !== undefined ||
6001
+ return (!!accessCache[key] ||
5980
6002
  (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) ||
5981
6003
  (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) ||
5982
6004
  ((normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key)) ||
@@ -7544,7 +7566,7 @@ function isMemoSame(cached, memo) {
7544
7566
  }
7545
7567
 
7546
7568
  // Core API ------------------------------------------------------------------
7547
- const version = "3.2.20";
7569
+ const version = "3.2.24";
7548
7570
  const _ssrUtils = {
7549
7571
  createComponentInstance,
7550
7572
  setupComponent,
@@ -7,13 +7,23 @@ var shared = require('@vue/shared');
7
7
 
8
8
  let buffer = [];
9
9
  function setDevtoolsHook(hook, target) {
10
+ var _a, _b;
10
11
  exports.devtools = hook;
11
12
  if (exports.devtools) {
12
13
  exports.devtools.enabled = true;
13
14
  buffer.forEach(({ event, args }) => exports.devtools.emit(event, ...args));
14
15
  buffer = [];
15
16
  }
16
- else {
17
+ else if (
18
+ // handle late devtools injection - only do this if we are in an actual
19
+ // browser environment to avoid the timer handle stalling test runner exit
20
+ // (#4815)
21
+ // eslint-disable-next-line no-restricted-globals
22
+ typeof window !== 'undefined' &&
23
+ // some envs mock window but not fully
24
+ window.HTMLElement &&
25
+ // also exclude jsdom
26
+ !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) {
17
27
  const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
18
28
  target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
19
29
  replay.push((newHook) => {
@@ -22,9 +32,15 @@ function setDevtoolsHook(hook, target) {
22
32
  // clear buffer after 3s - the user probably doesn't have devtools installed
23
33
  // at all, and keeping the buffer will cause memory leaks (#4738)
24
34
  setTimeout(() => {
25
- buffer = [];
35
+ if (!exports.devtools) {
36
+ target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
37
+ buffer = [];
38
+ }
26
39
  }, 3000);
27
40
  }
41
+ else {
42
+ buffer = [];
43
+ }
28
44
  }
29
45
 
30
46
  function emit(instance, event, ...rawArgs) {
@@ -1507,7 +1523,7 @@ function registerKeepAliveHook(hook, type, target = currentInstance) {
1507
1523
  }
1508
1524
  current = current.parent;
1509
1525
  }
1510
- hook();
1526
+ return hook();
1511
1527
  });
1512
1528
  injectHook(type, wrappedHook, target);
1513
1529
  // In addition to registering it on the target instance, we walk up the parent
@@ -2065,7 +2081,7 @@ function setFullProps(instance, rawProps, props, attrs) {
2065
2081
  }
2066
2082
  }
2067
2083
  else if (!isEmitListener(instance.emitsOptions, key)) {
2068
- if (value !== attrs[key]) {
2084
+ if (!(key in attrs) || value !== attrs[key]) {
2069
2085
  attrs[key] = value;
2070
2086
  hasAttrsChanged = true;
2071
2087
  }
@@ -3963,8 +3979,8 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
3963
3979
  *
3964
3980
  * #2080
3965
3981
  * Inside keyed `template` fragment static children, if a fragment is moved,
3966
- * the children will always moved so that need inherit el form previous nodes
3967
- * to ensure correct moved position.
3982
+ * the children will always be moved. Therefore, in order to ensure correct move
3983
+ * position, el should be inherited from previous nodes.
3968
3984
  */
3969
3985
  function traverseStaticChildren(n1, n2, shallow = false) {
3970
3986
  const ch1 = n1.children;
@@ -4664,7 +4680,8 @@ function mergeProps(...args) {
4664
4680
  else if (shared.isOn(key)) {
4665
4681
  const existing = ret[key];
4666
4682
  const incoming = toMerge[key];
4667
- if (existing !== incoming) {
4683
+ if (existing !== incoming &&
4684
+ !(shared.isArray(existing) && existing.includes(incoming))) {
4668
4685
  ret[key] = existing
4669
4686
  ? [].concat(existing, incoming)
4670
4687
  : incoming;
@@ -4840,23 +4857,23 @@ const PublicInstanceProxyHandlers = {
4840
4857
  const n = accessCache[key];
4841
4858
  if (n !== undefined) {
4842
4859
  switch (n) {
4843
- case 0 /* SETUP */:
4860
+ case 1 /* SETUP */:
4844
4861
  return setupState[key];
4845
- case 1 /* DATA */:
4862
+ case 2 /* DATA */:
4846
4863
  return data[key];
4847
- case 3 /* CONTEXT */:
4864
+ case 4 /* CONTEXT */:
4848
4865
  return ctx[key];
4849
- case 2 /* PROPS */:
4866
+ case 3 /* PROPS */:
4850
4867
  return props[key];
4851
4868
  // default: just fallthrough
4852
4869
  }
4853
4870
  }
4854
4871
  else if (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) {
4855
- accessCache[key] = 0 /* SETUP */;
4872
+ accessCache[key] = 1 /* SETUP */;
4856
4873
  return setupState[key];
4857
4874
  }
4858
4875
  else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) {
4859
- accessCache[key] = 1 /* DATA */;
4876
+ accessCache[key] = 2 /* DATA */;
4860
4877
  return data[key];
4861
4878
  }
4862
4879
  else if (
@@ -4864,15 +4881,15 @@ const PublicInstanceProxyHandlers = {
4864
4881
  // props
4865
4882
  (normalizedProps = instance.propsOptions[0]) &&
4866
4883
  shared.hasOwn(normalizedProps, key)) {
4867
- accessCache[key] = 2 /* PROPS */;
4884
+ accessCache[key] = 3 /* PROPS */;
4868
4885
  return props[key];
4869
4886
  }
4870
4887
  else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) {
4871
- accessCache[key] = 3 /* CONTEXT */;
4888
+ accessCache[key] = 4 /* CONTEXT */;
4872
4889
  return ctx[key];
4873
4890
  }
4874
4891
  else if (shouldCacheAccess) {
4875
- accessCache[key] = 4 /* OTHER */;
4892
+ accessCache[key] = 0 /* OTHER */;
4876
4893
  }
4877
4894
  }
4878
4895
  const publicGetter = publicPropertiesMap[key];
@@ -4892,7 +4909,7 @@ const PublicInstanceProxyHandlers = {
4892
4909
  }
4893
4910
  else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) {
4894
4911
  // user may set custom properties to `this` that start with `$`
4895
- accessCache[key] = 3 /* CONTEXT */;
4912
+ accessCache[key] = 4 /* CONTEXT */;
4896
4913
  return ctx[key];
4897
4914
  }
4898
4915
  else if (
@@ -4928,7 +4945,7 @@ const PublicInstanceProxyHandlers = {
4928
4945
  },
4929
4946
  has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
4930
4947
  let normalizedProps;
4931
- return (accessCache[key] !== undefined ||
4948
+ return (!!accessCache[key] ||
4932
4949
  (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) ||
4933
4950
  (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) ||
4934
4951
  ((normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key)) ||
@@ -6018,7 +6035,7 @@ function isMemoSame(cached, memo) {
6018
6035
  }
6019
6036
 
6020
6037
  // Core API ------------------------------------------------------------------
6021
- const version = "3.2.20";
6038
+ const version = "3.2.24";
6022
6039
  const _ssrUtils = {
6023
6040
  createComponentInstance,
6024
6041
  setupComponent,
@@ -29,6 +29,7 @@ import { ReactiveFlags } from '@vue/reactivity';
29
29
  import { readonly } from '@vue/reactivity';
30
30
  import { Ref } from '@vue/reactivity';
31
31
  import { ref } from '@vue/reactivity';
32
+ import { ShallowReactive } from '@vue/reactivity';
32
33
  import { shallowReactive } from '@vue/reactivity';
33
34
  import { shallowReadonly } from '@vue/reactivity';
34
35
  import { shallowRef } from '@vue/reactivity';
@@ -673,7 +674,7 @@ export declare function defineEmits<TypeEmit>(): TypeEmit;
673
674
  * This is only usable inside `<script setup>`, is compiled away in the
674
675
  * output and should **not** be actually called at runtime.
675
676
  */
676
- export declare function defineExpose(exposed?: Record<string, any>): void;
677
+ export declare function defineExpose<Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed): void;
677
678
 
678
679
  /**
679
680
  * Vue `<script setup>` compiler macro for declaring component props. The
@@ -876,6 +877,7 @@ export declare interface FunctionalComponent<P = {}, E extends EmitsOptions = {}
876
877
  emits?: E | (keyof E)[];
877
878
  inheritAttrs?: boolean;
878
879
  displayName?: string;
880
+ compatConfig?: CompatConfig;
879
881
  }
880
882
 
881
883
  export declare type FunctionDirective<T = any, V = any> = DirectiveHook<T, any, V>;
@@ -944,8 +946,12 @@ export declare interface HydrationRenderer extends Renderer<Element | ShadowRoot
944
946
  hydrate: RootHydrateFunction;
945
947
  }
946
948
 
949
+ declare type IfAny<T, Y, N> = 0 extends (1 & T) ? Y : N;
950
+
951
+ declare type InferDefault<P, T> = T extends null | number | string | boolean | symbol | Function ? T : (props: P) => T;
952
+
947
953
  declare type InferDefaults<T> = {
948
- [K in keyof T]?: NotUndefined<T[K]> extends number | string | boolean | symbol | Function ? NotUndefined<T[K]> : (props: T) => NotUndefined<T[K]>;
954
+ [K in keyof T]?: InferDefault<T, NotUndefined<T[K]>>;
949
955
  };
950
956
 
951
957
  declare type InferPropType<T> = [T] extends [null] ? any : [T] extends [{
@@ -958,7 +964,7 @@ declare type InferPropType<T> = [T] extends [null] ? any : [T] extends [{
958
964
  type: DateConstructor;
959
965
  }] ? Date : [T] extends [(infer U)[] | {
960
966
  type: (infer U)[];
961
- }] ? U extends DateConstructor ? Date | InferPropType<U> : InferPropType<U> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? D : V : T;
967
+ }] ? U extends DateConstructor ? Date | InferPropType<U> : InferPropType<U> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? IfAny<V, V, D> : V : T;
962
968
 
963
969
  export declare function initCustomFormatter(): void;
964
970
 
@@ -1595,6 +1601,8 @@ export declare interface SetupContext<E = EmitsOptions> {
1595
1601
 
1596
1602
  declare type SetupRenderEffectFn = (instance: ComponentInternalInstance, initialVNode: VNode, container: RendererElement, anchor: RendererNode | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, optimized: boolean) => void;
1597
1603
 
1604
+ export { ShallowReactive }
1605
+
1598
1606
  export { shallowReactive }
1599
1607
 
1600
1608
  export { shallowReadonly }
@@ -146,22 +146,33 @@ function tryWrap(fn) {
146
146
 
147
147
  let devtools;
148
148
  let buffer = [];
149
+ let devtoolsNotInstalled = false;
149
150
  function emit(event, ...args) {
150
151
  if (devtools) {
151
152
  devtools.emit(event, ...args);
152
153
  }
153
- else {
154
+ else if (!devtoolsNotInstalled) {
154
155
  buffer.push({ event, args });
155
156
  }
156
157
  }
157
158
  function setDevtoolsHook(hook, target) {
159
+ var _a, _b;
158
160
  devtools = hook;
159
161
  if (devtools) {
160
162
  devtools.enabled = true;
161
163
  buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
162
164
  buffer = [];
163
165
  }
164
- else {
166
+ else if (
167
+ // handle late devtools injection - only do this if we are in an actual
168
+ // browser environment to avoid the timer handle stalling test runner exit
169
+ // (#4815)
170
+ // eslint-disable-next-line no-restricted-globals
171
+ typeof window !== 'undefined' &&
172
+ // some envs mock window but not fully
173
+ window.HTMLElement &&
174
+ // also exclude jsdom
175
+ !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) {
165
176
  const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
166
177
  target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
167
178
  replay.push((newHook) => {
@@ -170,9 +181,18 @@ function setDevtoolsHook(hook, target) {
170
181
  // clear buffer after 3s - the user probably doesn't have devtools installed
171
182
  // at all, and keeping the buffer will cause memory leaks (#4738)
172
183
  setTimeout(() => {
173
- buffer = [];
184
+ if (!devtools) {
185
+ target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
186
+ devtoolsNotInstalled = true;
187
+ buffer = [];
188
+ }
174
189
  }, 3000);
175
190
  }
191
+ else {
192
+ // non-browser env, assume not installed
193
+ devtoolsNotInstalled = true;
194
+ buffer = [];
195
+ }
176
196
  }
177
197
  function devtoolsInitApp(app, version) {
178
198
  emit("app:init" /* APP_INIT */, app, version, {
@@ -1247,7 +1267,9 @@ const BaseTransitionImpl = {
1247
1267
  const rawProps = toRaw(props);
1248
1268
  const { mode } = rawProps;
1249
1269
  // check mode
1250
- if ((process.env.NODE_ENV !== 'production') && mode && !['in-out', 'out-in', 'default'].includes(mode)) {
1270
+ if ((process.env.NODE_ENV !== 'production') &&
1271
+ mode &&
1272
+ mode !== 'in-out' && mode !== 'out-in' && mode !== 'default') {
1251
1273
  warn(`invalid <transition> mode: ${mode}`);
1252
1274
  }
1253
1275
  // at this point children has a guaranteed length of 1.
@@ -1887,7 +1909,7 @@ function registerKeepAliveHook(hook, type, target = currentInstance) {
1887
1909
  }
1888
1910
  current = current.parent;
1889
1911
  }
1890
- hook();
1912
+ return hook();
1891
1913
  });
1892
1914
  injectHook(type, wrappedHook, target);
1893
1915
  // In addition to registering it on the target instance, we walk up the parent
@@ -2555,7 +2577,7 @@ function setFullProps(instance, rawProps, props, attrs) {
2555
2577
  }
2556
2578
  }
2557
2579
  else if (!isEmitListener(instance.emitsOptions, key)) {
2558
- if (value !== attrs[key]) {
2580
+ if (!(key in attrs) || value !== attrs[key]) {
2559
2581
  attrs[key] = value;
2560
2582
  hasAttrsChanged = true;
2561
2583
  }
@@ -2969,7 +2991,7 @@ return withDirectives(h(comp), [
2969
2991
  [bar, this.y]
2970
2992
  ])
2971
2993
  */
2972
- const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text');
2994
+ const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
2973
2995
  function validateDirectiveName(name) {
2974
2996
  if (isBuiltInDirective(name)) {
2975
2997
  warn('Do not use built-in directive ids as custom directive id: ' + name);
@@ -4935,8 +4957,8 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
4935
4957
  *
4936
4958
  * #2080
4937
4959
  * Inside keyed `template` fragment static children, if a fragment is moved,
4938
- * the children will always moved so that need inherit el form previous nodes
4939
- * to ensure correct moved position.
4960
+ * the children will always be moved. Therefore, in order to ensure correct move
4961
+ * position, el should be inherited from previous nodes.
4940
4962
  */
4941
4963
  function traverseStaticChildren(n1, n2, shallow = false) {
4942
4964
  const ch1 = n1.children;
@@ -5721,7 +5743,8 @@ function mergeProps(...args) {
5721
5743
  else if (isOn(key)) {
5722
5744
  const existing = ret[key];
5723
5745
  const incoming = toMerge[key];
5724
- if (existing !== incoming) {
5746
+ if (existing !== incoming &&
5747
+ !(isArray(existing) && existing.includes(incoming))) {
5725
5748
  ret[key] = existing
5726
5749
  ? [].concat(existing, incoming)
5727
5750
  : incoming;
@@ -5925,23 +5948,23 @@ const PublicInstanceProxyHandlers = {
5925
5948
  const n = accessCache[key];
5926
5949
  if (n !== undefined) {
5927
5950
  switch (n) {
5928
- case 0 /* SETUP */:
5951
+ case 1 /* SETUP */:
5929
5952
  return setupState[key];
5930
- case 1 /* DATA */:
5953
+ case 2 /* DATA */:
5931
5954
  return data[key];
5932
- case 3 /* CONTEXT */:
5955
+ case 4 /* CONTEXT */:
5933
5956
  return ctx[key];
5934
- case 2 /* PROPS */:
5957
+ case 3 /* PROPS */:
5935
5958
  return props[key];
5936
5959
  // default: just fallthrough
5937
5960
  }
5938
5961
  }
5939
5962
  else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
5940
- accessCache[key] = 0 /* SETUP */;
5963
+ accessCache[key] = 1 /* SETUP */;
5941
5964
  return setupState[key];
5942
5965
  }
5943
5966
  else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
5944
- accessCache[key] = 1 /* DATA */;
5967
+ accessCache[key] = 2 /* DATA */;
5945
5968
  return data[key];
5946
5969
  }
5947
5970
  else if (
@@ -5949,15 +5972,15 @@ const PublicInstanceProxyHandlers = {
5949
5972
  // props
5950
5973
  (normalizedProps = instance.propsOptions[0]) &&
5951
5974
  hasOwn(normalizedProps, key)) {
5952
- accessCache[key] = 2 /* PROPS */;
5975
+ accessCache[key] = 3 /* PROPS */;
5953
5976
  return props[key];
5954
5977
  }
5955
5978
  else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
5956
- accessCache[key] = 3 /* CONTEXT */;
5979
+ accessCache[key] = 4 /* CONTEXT */;
5957
5980
  return ctx[key];
5958
5981
  }
5959
5982
  else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {
5960
- accessCache[key] = 4 /* OTHER */;
5983
+ accessCache[key] = 0 /* OTHER */;
5961
5984
  }
5962
5985
  }
5963
5986
  const publicGetter = publicPropertiesMap[key];
@@ -5978,7 +6001,7 @@ const PublicInstanceProxyHandlers = {
5978
6001
  }
5979
6002
  else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
5980
6003
  // user may set custom properties to `this` that start with `$`
5981
- accessCache[key] = 3 /* CONTEXT */;
6004
+ accessCache[key] = 4 /* CONTEXT */;
5982
6005
  return ctx[key];
5983
6006
  }
5984
6007
  else if (
@@ -6042,7 +6065,7 @@ const PublicInstanceProxyHandlers = {
6042
6065
  },
6043
6066
  has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
6044
6067
  let normalizedProps;
6045
- return (accessCache[key] !== undefined ||
6068
+ return (!!accessCache[key] ||
6046
6069
  (data !== EMPTY_OBJ && hasOwn(data, key)) ||
6047
6070
  (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) ||
6048
6071
  ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
@@ -7639,7 +7662,7 @@ function isMemoSame(cached, memo) {
7639
7662
  }
7640
7663
 
7641
7664
  // Core API ------------------------------------------------------------------
7642
- const version = "3.2.20";
7665
+ const version = "3.2.24";
7643
7666
  const _ssrUtils = {
7644
7667
  createComponentInstance,
7645
7668
  setupComponent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.2.20",
3
+ "version": "3.2.24",
4
4
  "description": "@vue/runtime-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/runtime-core.esm-bundler.js",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/runtime-core#readme",
34
34
  "dependencies": {
35
- "@vue/shared": "3.2.20",
36
- "@vue/reactivity": "3.2.20"
35
+ "@vue/shared": "3.2.24",
36
+ "@vue/reactivity": "3.2.24"
37
37
  }
38
38
  }