@vue/runtime-core 3.2.21 → 3.2.22

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.
@@ -157,6 +157,7 @@ function emit(event, ...args) {
157
157
  }
158
158
  }
159
159
  function setDevtoolsHook(hook, target) {
160
+ var _a, _b;
160
161
  exports.devtools = hook;
161
162
  if (exports.devtools) {
162
163
  exports.devtools.enabled = true;
@@ -169,7 +170,10 @@ function setDevtoolsHook(hook, target) {
169
170
  // (#4815)
170
171
  // eslint-disable-next-line no-restricted-globals
171
172
  typeof window !== 'undefined' &&
172
- !navigator.userAgent.includes('jsdom')) {
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'))) {
173
177
  const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
174
178
  target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
175
179
  replay.push((newHook) => {
@@ -4894,8 +4898,8 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
4894
4898
  *
4895
4899
  * #2080
4896
4900
  * Inside keyed `template` fragment static children, if a fragment is moved,
4897
- * the children will always moved so that need inherit el form previous nodes
4898
- * to ensure correct moved position.
4901
+ * the children will always be moved. Therefore, in order to ensure correct move
4902
+ * position, el should be inherited from previous nodes.
4899
4903
  */
4900
4904
  function traverseStaticChildren(n1, n2, shallow = false) {
4901
4905
  const ch1 = n1.children;
@@ -5675,7 +5679,8 @@ function mergeProps(...args) {
5675
5679
  else if (shared.isOn(key)) {
5676
5680
  const existing = ret[key];
5677
5681
  const incoming = toMerge[key];
5678
- if (existing !== incoming) {
5682
+ if (existing !== incoming &&
5683
+ !(shared.isArray(existing) && existing.includes(incoming))) {
5679
5684
  ret[key] = existing
5680
5685
  ? [].concat(existing, incoming)
5681
5686
  : incoming;
@@ -7560,7 +7565,7 @@ function isMemoSame(cached, memo) {
7560
7565
  }
7561
7566
 
7562
7567
  // Core API ------------------------------------------------------------------
7563
- const version = "3.2.21";
7568
+ const version = "3.2.22";
7564
7569
  const _ssrUtils = {
7565
7570
  createComponentInstance,
7566
7571
  setupComponent,
@@ -7,6 +7,7 @@ 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;
@@ -19,7 +20,10 @@ function setDevtoolsHook(hook, target) {
19
20
  // (#4815)
20
21
  // eslint-disable-next-line no-restricted-globals
21
22
  typeof window !== 'undefined' &&
22
- !navigator.userAgent.includes('jsdom')) {
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'))) {
23
27
  const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
24
28
  target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
25
29
  replay.push((newHook) => {
@@ -3975,8 +3979,8 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
3975
3979
  *
3976
3980
  * #2080
3977
3981
  * Inside keyed `template` fragment static children, if a fragment is moved,
3978
- * the children will always moved so that need inherit el form previous nodes
3979
- * 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.
3980
3984
  */
3981
3985
  function traverseStaticChildren(n1, n2, shallow = false) {
3982
3986
  const ch1 = n1.children;
@@ -4676,7 +4680,8 @@ function mergeProps(...args) {
4676
4680
  else if (shared.isOn(key)) {
4677
4681
  const existing = ret[key];
4678
4682
  const incoming = toMerge[key];
4679
- if (existing !== incoming) {
4683
+ if (existing !== incoming &&
4684
+ !(shared.isArray(existing) && existing.includes(incoming))) {
4680
4685
  ret[key] = existing
4681
4686
  ? [].concat(existing, incoming)
4682
4687
  : incoming;
@@ -6030,7 +6035,7 @@ function isMemoSame(cached, memo) {
6030
6035
  }
6031
6036
 
6032
6037
  // Core API ------------------------------------------------------------------
6033
- const version = "3.2.21";
6038
+ const version = "3.2.22";
6034
6039
  const _ssrUtils = {
6035
6040
  createComponentInstance,
6036
6041
  setupComponent,
@@ -945,8 +945,10 @@ 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;
949
+
948
950
  declare type InferDefaults<T> = {
949
- [K in keyof T]?: NotUndefined<T[K]> extends number | string | boolean | symbol | Function ? NotUndefined<T[K]> : (props: T) => NotUndefined<T[K]>;
951
+ [K in keyof T]?: InferDefault<T, NotUndefined<T[K]>>;
950
952
  };
951
953
 
952
954
  declare type InferPropType<T> = [T] extends [null] ? any : [T] extends [{
@@ -156,6 +156,7 @@ function emit(event, ...args) {
156
156
  }
157
157
  }
158
158
  function setDevtoolsHook(hook, target) {
159
+ var _a, _b;
159
160
  devtools = hook;
160
161
  if (devtools) {
161
162
  devtools.enabled = true;
@@ -168,7 +169,10 @@ function setDevtoolsHook(hook, target) {
168
169
  // (#4815)
169
170
  // eslint-disable-next-line no-restricted-globals
170
171
  typeof window !== 'undefined' &&
171
- !navigator.userAgent.includes('jsdom')) {
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'))) {
172
176
  const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
173
177
  target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
174
178
  replay.push((newHook) => {
@@ -4951,8 +4955,8 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
4951
4955
  *
4952
4956
  * #2080
4953
4957
  * Inside keyed `template` fragment static children, if a fragment is moved,
4954
- * the children will always moved so that need inherit el form previous nodes
4955
- * to ensure correct moved position.
4958
+ * the children will always be moved. Therefore, in order to ensure correct move
4959
+ * position, el should be inherited from previous nodes.
4956
4960
  */
4957
4961
  function traverseStaticChildren(n1, n2, shallow = false) {
4958
4962
  const ch1 = n1.children;
@@ -5737,7 +5741,8 @@ function mergeProps(...args) {
5737
5741
  else if (isOn(key)) {
5738
5742
  const existing = ret[key];
5739
5743
  const incoming = toMerge[key];
5740
- if (existing !== incoming) {
5744
+ if (existing !== incoming &&
5745
+ !(isArray(existing) && existing.includes(incoming))) {
5741
5746
  ret[key] = existing
5742
5747
  ? [].concat(existing, incoming)
5743
5748
  : incoming;
@@ -7655,7 +7660,7 @@ function isMemoSame(cached, memo) {
7655
7660
  }
7656
7661
 
7657
7662
  // Core API ------------------------------------------------------------------
7658
- const version = "3.2.21";
7663
+ const version = "3.2.22";
7659
7664
  const _ssrUtils = {
7660
7665
  createComponentInstance,
7661
7666
  setupComponent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.2.21",
3
+ "version": "3.2.22",
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.21",
36
- "@vue/reactivity": "3.2.21"
35
+ "@vue/shared": "3.2.22",
36
+ "@vue/reactivity": "3.2.22"
37
37
  }
38
38
  }