@vue/runtime-core 3.2.22 → 3.2.23

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.
@@ -1267,7 +1267,8 @@ const BaseTransitionImpl = {
1267
1267
  const rawProps = reactivity.toRaw(props);
1268
1268
  const { mode } = rawProps;
1269
1269
  // check mode
1270
- if (mode && !['in-out', 'out-in', 'default'].includes(mode)) {
1270
+ if (mode &&
1271
+ mode !== 'in-out' && mode !== 'out-in' && mode !== 'default') {
1271
1272
  warn(`invalid <transition> mode: ${mode}`);
1272
1273
  }
1273
1274
  // at this point children has a guaranteed length of 1.
@@ -1907,7 +1908,7 @@ function registerKeepAliveHook(hook, type, target = currentInstance) {
1907
1908
  }
1908
1909
  current = current.parent;
1909
1910
  }
1910
- hook();
1911
+ return hook();
1911
1912
  });
1912
1913
  injectHook(type, wrappedHook, target);
1913
1914
  // In addition to registering it on the target instance, we walk up the parent
@@ -5883,23 +5884,23 @@ const PublicInstanceProxyHandlers = {
5883
5884
  const n = accessCache[key];
5884
5885
  if (n !== undefined) {
5885
5886
  switch (n) {
5886
- case 0 /* SETUP */:
5887
+ case 1 /* SETUP */:
5887
5888
  return setupState[key];
5888
- case 1 /* DATA */:
5889
+ case 2 /* DATA */:
5889
5890
  return data[key];
5890
- case 3 /* CONTEXT */:
5891
+ case 4 /* CONTEXT */:
5891
5892
  return ctx[key];
5892
- case 2 /* PROPS */:
5893
+ case 3 /* PROPS */:
5893
5894
  return props[key];
5894
5895
  // default: just fallthrough
5895
5896
  }
5896
5897
  }
5897
5898
  else if (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) {
5898
- accessCache[key] = 0 /* SETUP */;
5899
+ accessCache[key] = 1 /* SETUP */;
5899
5900
  return setupState[key];
5900
5901
  }
5901
5902
  else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) {
5902
- accessCache[key] = 1 /* DATA */;
5903
+ accessCache[key] = 2 /* DATA */;
5903
5904
  return data[key];
5904
5905
  }
5905
5906
  else if (
@@ -5907,15 +5908,15 @@ const PublicInstanceProxyHandlers = {
5907
5908
  // props
5908
5909
  (normalizedProps = instance.propsOptions[0]) &&
5909
5910
  shared.hasOwn(normalizedProps, key)) {
5910
- accessCache[key] = 2 /* PROPS */;
5911
+ accessCache[key] = 3 /* PROPS */;
5911
5912
  return props[key];
5912
5913
  }
5913
5914
  else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) {
5914
- accessCache[key] = 3 /* CONTEXT */;
5915
+ accessCache[key] = 4 /* CONTEXT */;
5915
5916
  return ctx[key];
5916
5917
  }
5917
5918
  else if (shouldCacheAccess) {
5918
- accessCache[key] = 4 /* OTHER */;
5919
+ accessCache[key] = 0 /* OTHER */;
5919
5920
  }
5920
5921
  }
5921
5922
  const publicGetter = publicPropertiesMap[key];
@@ -5936,7 +5937,7 @@ const PublicInstanceProxyHandlers = {
5936
5937
  }
5937
5938
  else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) {
5938
5939
  // user may set custom properties to `this` that start with `$`
5939
- accessCache[key] = 3 /* CONTEXT */;
5940
+ accessCache[key] = 4 /* CONTEXT */;
5940
5941
  return ctx[key];
5941
5942
  }
5942
5943
  else if (
@@ -5997,7 +5998,7 @@ const PublicInstanceProxyHandlers = {
5997
5998
  },
5998
5999
  has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
5999
6000
  let normalizedProps;
6000
- return (accessCache[key] !== undefined ||
6001
+ return (!!accessCache[key] ||
6001
6002
  (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) ||
6002
6003
  (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) ||
6003
6004
  ((normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key)) ||
@@ -7565,7 +7566,7 @@ function isMemoSame(cached, memo) {
7565
7566
  }
7566
7567
 
7567
7568
  // Core API ------------------------------------------------------------------
7568
- const version = "3.2.22";
7569
+ const version = "3.2.23";
7569
7570
  const _ssrUtils = {
7570
7571
  createComponentInstance,
7571
7572
  setupComponent,
@@ -1523,7 +1523,7 @@ function registerKeepAliveHook(hook, type, target = currentInstance) {
1523
1523
  }
1524
1524
  current = current.parent;
1525
1525
  }
1526
- hook();
1526
+ return hook();
1527
1527
  });
1528
1528
  injectHook(type, wrappedHook, target);
1529
1529
  // In addition to registering it on the target instance, we walk up the parent
@@ -4857,23 +4857,23 @@ const PublicInstanceProxyHandlers = {
4857
4857
  const n = accessCache[key];
4858
4858
  if (n !== undefined) {
4859
4859
  switch (n) {
4860
- case 0 /* SETUP */:
4860
+ case 1 /* SETUP */:
4861
4861
  return setupState[key];
4862
- case 1 /* DATA */:
4862
+ case 2 /* DATA */:
4863
4863
  return data[key];
4864
- case 3 /* CONTEXT */:
4864
+ case 4 /* CONTEXT */:
4865
4865
  return ctx[key];
4866
- case 2 /* PROPS */:
4866
+ case 3 /* PROPS */:
4867
4867
  return props[key];
4868
4868
  // default: just fallthrough
4869
4869
  }
4870
4870
  }
4871
4871
  else if (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) {
4872
- accessCache[key] = 0 /* SETUP */;
4872
+ accessCache[key] = 1 /* SETUP */;
4873
4873
  return setupState[key];
4874
4874
  }
4875
4875
  else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) {
4876
- accessCache[key] = 1 /* DATA */;
4876
+ accessCache[key] = 2 /* DATA */;
4877
4877
  return data[key];
4878
4878
  }
4879
4879
  else if (
@@ -4881,15 +4881,15 @@ const PublicInstanceProxyHandlers = {
4881
4881
  // props
4882
4882
  (normalizedProps = instance.propsOptions[0]) &&
4883
4883
  shared.hasOwn(normalizedProps, key)) {
4884
- accessCache[key] = 2 /* PROPS */;
4884
+ accessCache[key] = 3 /* PROPS */;
4885
4885
  return props[key];
4886
4886
  }
4887
4887
  else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) {
4888
- accessCache[key] = 3 /* CONTEXT */;
4888
+ accessCache[key] = 4 /* CONTEXT */;
4889
4889
  return ctx[key];
4890
4890
  }
4891
4891
  else if (shouldCacheAccess) {
4892
- accessCache[key] = 4 /* OTHER */;
4892
+ accessCache[key] = 0 /* OTHER */;
4893
4893
  }
4894
4894
  }
4895
4895
  const publicGetter = publicPropertiesMap[key];
@@ -4909,7 +4909,7 @@ const PublicInstanceProxyHandlers = {
4909
4909
  }
4910
4910
  else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) {
4911
4911
  // user may set custom properties to `this` that start with `$`
4912
- accessCache[key] = 3 /* CONTEXT */;
4912
+ accessCache[key] = 4 /* CONTEXT */;
4913
4913
  return ctx[key];
4914
4914
  }
4915
4915
  else if (
@@ -4945,7 +4945,7 @@ const PublicInstanceProxyHandlers = {
4945
4945
  },
4946
4946
  has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
4947
4947
  let normalizedProps;
4948
- return (accessCache[key] !== undefined ||
4948
+ return (!!accessCache[key] ||
4949
4949
  (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) ||
4950
4950
  (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) ||
4951
4951
  ((normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key)) ||
@@ -6035,7 +6035,7 @@ function isMemoSame(cached, memo) {
6035
6035
  }
6036
6036
 
6037
6037
  // Core API ------------------------------------------------------------------
6038
- const version = "3.2.22";
6038
+ const version = "3.2.23";
6039
6039
  const _ssrUtils = {
6040
6040
  createComponentInstance,
6041
6041
  setupComponent,
@@ -945,7 +945,9 @@ export declare interface HydrationRenderer extends Renderer<Element | ShadowRoot
945
945
  hydrate: RootHydrateFunction;
946
946
  }
947
947
 
948
- declare type InferDefault<P, T> = T extends number | string | boolean | symbol | Function ? T : (props: P) => T;
948
+ declare type IfAny<T, Y, N> = 0 extends (1 & T) ? Y : N;
949
+
950
+ declare type InferDefault<P, T> = T extends null | number | string | boolean | symbol | Function ? T : (props: P) => T;
949
951
 
950
952
  declare type InferDefaults<T> = {
951
953
  [K in keyof T]?: InferDefault<T, NotUndefined<T[K]>>;
@@ -961,7 +963,7 @@ declare type InferPropType<T> = [T] extends [null] ? any : [T] extends [{
961
963
  type: DateConstructor;
962
964
  }] ? Date : [T] extends [(infer U)[] | {
963
965
  type: (infer U)[];
964
- }] ? U extends DateConstructor ? Date | InferPropType<U> : InferPropType<U> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? D : V : T;
966
+ }] ? U extends DateConstructor ? Date | InferPropType<U> : InferPropType<U> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? IfAny<V, V, D> : V : T;
965
967
 
966
968
  export declare function initCustomFormatter(): void;
967
969
 
@@ -1267,7 +1267,9 @@ const BaseTransitionImpl = {
1267
1267
  const rawProps = toRaw(props);
1268
1268
  const { mode } = rawProps;
1269
1269
  // check mode
1270
- 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') {
1271
1273
  warn(`invalid <transition> mode: ${mode}`);
1272
1274
  }
1273
1275
  // at this point children has a guaranteed length of 1.
@@ -1907,7 +1909,7 @@ function registerKeepAliveHook(hook, type, target = currentInstance) {
1907
1909
  }
1908
1910
  current = current.parent;
1909
1911
  }
1910
- hook();
1912
+ return hook();
1911
1913
  });
1912
1914
  injectHook(type, wrappedHook, target);
1913
1915
  // In addition to registering it on the target instance, we walk up the parent
@@ -5946,23 +5948,23 @@ const PublicInstanceProxyHandlers = {
5946
5948
  const n = accessCache[key];
5947
5949
  if (n !== undefined) {
5948
5950
  switch (n) {
5949
- case 0 /* SETUP */:
5951
+ case 1 /* SETUP */:
5950
5952
  return setupState[key];
5951
- case 1 /* DATA */:
5953
+ case 2 /* DATA */:
5952
5954
  return data[key];
5953
- case 3 /* CONTEXT */:
5955
+ case 4 /* CONTEXT */:
5954
5956
  return ctx[key];
5955
- case 2 /* PROPS */:
5957
+ case 3 /* PROPS */:
5956
5958
  return props[key];
5957
5959
  // default: just fallthrough
5958
5960
  }
5959
5961
  }
5960
5962
  else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
5961
- accessCache[key] = 0 /* SETUP */;
5963
+ accessCache[key] = 1 /* SETUP */;
5962
5964
  return setupState[key];
5963
5965
  }
5964
5966
  else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
5965
- accessCache[key] = 1 /* DATA */;
5967
+ accessCache[key] = 2 /* DATA */;
5966
5968
  return data[key];
5967
5969
  }
5968
5970
  else if (
@@ -5970,15 +5972,15 @@ const PublicInstanceProxyHandlers = {
5970
5972
  // props
5971
5973
  (normalizedProps = instance.propsOptions[0]) &&
5972
5974
  hasOwn(normalizedProps, key)) {
5973
- accessCache[key] = 2 /* PROPS */;
5975
+ accessCache[key] = 3 /* PROPS */;
5974
5976
  return props[key];
5975
5977
  }
5976
5978
  else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
5977
- accessCache[key] = 3 /* CONTEXT */;
5979
+ accessCache[key] = 4 /* CONTEXT */;
5978
5980
  return ctx[key];
5979
5981
  }
5980
5982
  else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {
5981
- accessCache[key] = 4 /* OTHER */;
5983
+ accessCache[key] = 0 /* OTHER */;
5982
5984
  }
5983
5985
  }
5984
5986
  const publicGetter = publicPropertiesMap[key];
@@ -5999,7 +6001,7 @@ const PublicInstanceProxyHandlers = {
5999
6001
  }
6000
6002
  else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
6001
6003
  // user may set custom properties to `this` that start with `$`
6002
- accessCache[key] = 3 /* CONTEXT */;
6004
+ accessCache[key] = 4 /* CONTEXT */;
6003
6005
  return ctx[key];
6004
6006
  }
6005
6007
  else if (
@@ -6063,7 +6065,7 @@ const PublicInstanceProxyHandlers = {
6063
6065
  },
6064
6066
  has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
6065
6067
  let normalizedProps;
6066
- return (accessCache[key] !== undefined ||
6068
+ return (!!accessCache[key] ||
6067
6069
  (data !== EMPTY_OBJ && hasOwn(data, key)) ||
6068
6070
  (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) ||
6069
6071
  ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) ||
@@ -7660,7 +7662,7 @@ function isMemoSame(cached, memo) {
7660
7662
  }
7661
7663
 
7662
7664
  // Core API ------------------------------------------------------------------
7663
- const version = "3.2.22";
7665
+ const version = "3.2.23";
7664
7666
  const _ssrUtils = {
7665
7667
  createComponentInstance,
7666
7668
  setupComponent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.2.22",
3
+ "version": "3.2.23",
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.22",
36
- "@vue/reactivity": "3.2.22"
35
+ "@vue/shared": "3.2.23",
36
+ "@vue/reactivity": "3.2.23"
37
37
  }
38
38
  }