@vue/runtime-core 3.5.3 → 3.5.5

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.3
2
+ * @vue/runtime-core v3.5.5
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -431,23 +431,19 @@ function flushJobs(seen) {
431
431
  }
432
432
  }
433
433
  function checkRecursiveUpdates(seen, fn) {
434
- if (!seen.has(fn)) {
435
- seen.set(fn, 1);
436
- } else {
437
- const count = seen.get(fn);
438
- if (count > RECURSION_LIMIT) {
439
- const instance = fn.i;
440
- const componentName = instance && getComponentName(instance.type);
441
- handleError(
442
- `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
443
- null,
444
- 10
445
- );
446
- return true;
447
- } else {
448
- seen.set(fn, count + 1);
449
- }
434
+ const count = seen.get(fn) || 0;
435
+ if (count > RECURSION_LIMIT) {
436
+ const instance = fn.i;
437
+ const componentName = instance && getComponentName(instance.type);
438
+ handleError(
439
+ `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
440
+ null,
441
+ 10
442
+ );
443
+ return true;
450
444
  }
445
+ seen.set(fn, count + 1);
446
+ return false;
451
447
  }
452
448
 
453
449
  let isHmrUpdating = false;
@@ -528,7 +524,9 @@ function reload(id, newComp) {
528
524
  dirtyInstances.delete(instance);
529
525
  } else if (instance.parent) {
530
526
  queueJob(() => {
527
+ isHmrUpdating = true;
531
528
  instance.parent.update();
529
+ isHmrUpdating = false;
532
530
  dirtyInstances.delete(instance);
533
531
  });
534
532
  } else if (instance.appContext.reload) {
@@ -819,6 +817,9 @@ const TeleportImpl = {
819
817
  insert(mainAnchor, container, anchor);
820
818
  const mount = (container2, anchor2) => {
821
819
  if (shapeFlag & 16) {
820
+ if (parentComponent && parentComponent.isCE) {
821
+ parentComponent.ce._teleportTarget = container2;
822
+ }
822
823
  mountChildren(
823
824
  children,
824
825
  container2,
@@ -1849,7 +1850,11 @@ Server rendered element contains more child nodes than client vdom.`
1849
1850
  remove(cur);
1850
1851
  }
1851
1852
  } else if (shapeFlag & 8) {
1852
- if (el.textContent !== vnode.children) {
1853
+ let clientText = vnode.children;
1854
+ if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
1855
+ clientText = clientText.slice(1);
1856
+ }
1857
+ if (el.textContent !== clientText) {
1853
1858
  if (!isMismatchAllowed(el, 0 /* TEXT */)) {
1854
1859
  warn$1(
1855
1860
  `Hydration text content mismatch on`,
@@ -2048,7 +2053,7 @@ Server rendered element contains fewer child nodes than client vdom.`
2048
2053
  }
2049
2054
  };
2050
2055
  const isTemplateNode = (node) => {
2051
- return node.nodeType === 1 && node.tagName.toLowerCase() === "template";
2056
+ return node.nodeType === 1 && node.tagName === "TEMPLATE";
2052
2057
  };
2053
2058
  return [hydrate, hydrateNode];
2054
2059
  }
@@ -2400,7 +2405,7 @@ function defineAsyncComponent(source) {
2400
2405
  load().then(() => {
2401
2406
  loaded.value = true;
2402
2407
  if (instance.parent && isKeepAlive(instance.parent.vnode)) {
2403
- queueJob(instance.parent.update);
2408
+ instance.parent.update();
2404
2409
  }
2405
2410
  }).catch((err) => {
2406
2411
  onError(err);
@@ -2801,13 +2806,15 @@ function renderList(source, renderItem, cache, index) {
2801
2806
  const sourceIsArray = shared.isArray(source);
2802
2807
  if (sourceIsArray || shared.isString(source)) {
2803
2808
  const sourceIsReactiveArray = sourceIsArray && reactivity.isReactive(source);
2809
+ let needsWrap = false;
2804
2810
  if (sourceIsReactiveArray) {
2811
+ needsWrap = !reactivity.isShallow(source);
2805
2812
  source = reactivity.shallowReadArray(source);
2806
2813
  }
2807
2814
  ret = new Array(source.length);
2808
2815
  for (let i = 0, l = source.length; i < l; i++) {
2809
2816
  ret[i] = renderItem(
2810
- sourceIsReactiveArray ? reactivity.toReactive(source[i]) : source[i],
2817
+ needsWrap ? reactivity.toReactive(source[i]) : source[i],
2811
2818
  i,
2812
2819
  void 0,
2813
2820
  cached && cached[i]
@@ -5080,6 +5087,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5080
5087
  }
5081
5088
  }
5082
5089
  if (instance.asyncDep) {
5090
+ if (isHmrUpdating) initialVNode.el = null;
5083
5091
  parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
5084
5092
  if (!initialVNode.el) {
5085
5093
  const placeholder = instance.subTree = createVNode(Comment);
@@ -8231,7 +8239,7 @@ function isMemoSame(cached, memo) {
8231
8239
  return true;
8232
8240
  }
8233
8241
 
8234
- const version = "3.5.3";
8242
+ const version = "3.5.5";
8235
8243
  const warn = warn$1 ;
8236
8244
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8237
8245
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.3
2
+ * @vue/runtime-core v3.5.5
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -416,6 +416,9 @@ const TeleportImpl = {
416
416
  insert(mainAnchor, container, anchor);
417
417
  const mount = (container2, anchor2) => {
418
418
  if (shapeFlag & 16) {
419
+ if (parentComponent && parentComponent.isCE) {
420
+ parentComponent.ce._teleportTarget = container2;
421
+ }
419
422
  mountChildren(
420
423
  children,
421
424
  container2,
@@ -1365,7 +1368,11 @@ function createHydrationFunctions(rendererInternals) {
1365
1368
  remove(cur);
1366
1369
  }
1367
1370
  } else if (shapeFlag & 8) {
1368
- if (el.textContent !== vnode.children) {
1371
+ let clientText = vnode.children;
1372
+ if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
1373
+ clientText = clientText.slice(1);
1374
+ }
1375
+ if (el.textContent !== clientText) {
1369
1376
  if (!isMismatchAllowed(el, 0 /* TEXT */)) {
1370
1377
  logMismatchError();
1371
1378
  }
@@ -1544,7 +1551,7 @@ function createHydrationFunctions(rendererInternals) {
1544
1551
  }
1545
1552
  };
1546
1553
  const isTemplateNode = (node) => {
1547
- return node.nodeType === 1 && node.tagName.toLowerCase() === "template";
1554
+ return node.nodeType === 1 && node.tagName === "TEMPLATE";
1548
1555
  };
1549
1556
  return [hydrate, hydrateNode];
1550
1557
  }
@@ -1768,7 +1775,7 @@ function defineAsyncComponent(source) {
1768
1775
  load().then(() => {
1769
1776
  loaded.value = true;
1770
1777
  if (instance.parent && isKeepAlive(instance.parent.vnode)) {
1771
- queueJob(instance.parent.update);
1778
+ instance.parent.update();
1772
1779
  }
1773
1780
  }).catch((err) => {
1774
1781
  onError(err);
@@ -2143,13 +2150,15 @@ function renderList(source, renderItem, cache, index) {
2143
2150
  const sourceIsArray = shared.isArray(source);
2144
2151
  if (sourceIsArray || shared.isString(source)) {
2145
2152
  const sourceIsReactiveArray = sourceIsArray && reactivity.isReactive(source);
2153
+ let needsWrap = false;
2146
2154
  if (sourceIsReactiveArray) {
2155
+ needsWrap = !reactivity.isShallow(source);
2147
2156
  source = reactivity.shallowReadArray(source);
2148
2157
  }
2149
2158
  ret = new Array(source.length);
2150
2159
  for (let i = 0, l = source.length; i < l; i++) {
2151
2160
  ret[i] = renderItem(
2152
- sourceIsReactiveArray ? reactivity.toReactive(source[i]) : source[i],
2161
+ needsWrap ? reactivity.toReactive(source[i]) : source[i],
2153
2162
  i,
2154
2163
  void 0,
2155
2164
  cached && cached[i]
@@ -6399,7 +6408,7 @@ function isMemoSame(cached, memo) {
6399
6408
  return true;
6400
6409
  }
6401
6410
 
6402
- const version = "3.5.3";
6411
+ const version = "3.5.5";
6403
6412
  const warn$1 = shared.NOOP;
6404
6413
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6405
6414
  const devtools = void 0;
@@ -367,9 +367,9 @@ export type EmitsToProps<T extends EmitsOptions | ComponentTypeEmits> = T extend
367
367
  } : T extends ObjectEmitsOptions ? {
368
368
  [K in string & keyof T as `on${Capitalize<K>}`]?: (...args: T[K] extends (...args: infer P) => any ? P : T[K] extends null ? any[] : never) => any;
369
369
  } : {};
370
- type TypeEmitsToOptions<T extends ComponentTypeEmits> = T extends Record<string, any[]> ? {
371
- [K in keyof T]: T[K] extends [...args: infer Args] ? (...args: Args) => any : () => any;
372
- } : T extends (...args: any[]) => any ? ParametersToFns<OverloadParameters<T>> : {};
370
+ type TypeEmitsToOptions<T extends ComponentTypeEmits> = {
371
+ [K in keyof T & string]: T[K] extends [...args: infer Args] ? (...args: Args) => any : () => any;
372
+ } & (T extends (...args: any[]) => any ? ParametersToFns<OverloadParameters<T>> : {});
373
373
  type ParametersToFns<T extends any[]> = {
374
374
  [K in T[0]]: K extends `${infer C}` ? (...args: T extends [C, ...infer Args] ? Args : never) => any : never;
375
375
  };
@@ -1,9 +1,9 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.3
2
+ * @vue/runtime-core v3.5.5
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
6
- import { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, shallowReadArray, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isShallow, isReadonly } from '@vue/reactivity';
6
+ import { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, shallowReadArray, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity';
7
7
  export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
8
8
  import { isString, isFunction, isPromise, isArray, EMPTY_OBJ, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, capitalize, camelize, isGloballyAllowed, NO, hyphenate, EMPTY_ARR, toRawType, makeMap, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared';
9
9
  export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
@@ -434,23 +434,19 @@ function flushJobs(seen) {
434
434
  }
435
435
  }
436
436
  function checkRecursiveUpdates(seen, fn) {
437
- if (!seen.has(fn)) {
438
- seen.set(fn, 1);
439
- } else {
440
- const count = seen.get(fn);
441
- if (count > RECURSION_LIMIT) {
442
- const instance = fn.i;
443
- const componentName = instance && getComponentName(instance.type);
444
- handleError(
445
- `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
446
- null,
447
- 10
448
- );
449
- return true;
450
- } else {
451
- seen.set(fn, count + 1);
452
- }
437
+ const count = seen.get(fn) || 0;
438
+ if (count > RECURSION_LIMIT) {
439
+ const instance = fn.i;
440
+ const componentName = instance && getComponentName(instance.type);
441
+ handleError(
442
+ `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
443
+ null,
444
+ 10
445
+ );
446
+ return true;
453
447
  }
448
+ seen.set(fn, count + 1);
449
+ return false;
454
450
  }
455
451
 
456
452
  let isHmrUpdating = false;
@@ -531,7 +527,9 @@ function reload(id, newComp) {
531
527
  dirtyInstances.delete(instance);
532
528
  } else if (instance.parent) {
533
529
  queueJob(() => {
530
+ isHmrUpdating = true;
534
531
  instance.parent.update();
532
+ isHmrUpdating = false;
535
533
  dirtyInstances.delete(instance);
536
534
  });
537
535
  } else if (instance.appContext.reload) {
@@ -822,6 +820,9 @@ const TeleportImpl = {
822
820
  insert(mainAnchor, container, anchor);
823
821
  const mount = (container2, anchor2) => {
824
822
  if (shapeFlag & 16) {
823
+ if (parentComponent && parentComponent.isCE) {
824
+ parentComponent.ce._teleportTarget = container2;
825
+ }
825
826
  mountChildren(
826
827
  children,
827
828
  container2,
@@ -1853,7 +1854,11 @@ Server rendered element contains more child nodes than client vdom.`
1853
1854
  remove(cur);
1854
1855
  }
1855
1856
  } else if (shapeFlag & 8) {
1856
- if (el.textContent !== vnode.children) {
1857
+ let clientText = vnode.children;
1858
+ if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
1859
+ clientText = clientText.slice(1);
1860
+ }
1861
+ if (el.textContent !== clientText) {
1857
1862
  if (!isMismatchAllowed(el, 0 /* TEXT */)) {
1858
1863
  (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(
1859
1864
  `Hydration text content mismatch on`,
@@ -2063,7 +2068,7 @@ Server rendered element contains fewer child nodes than client vdom.`
2063
2068
  }
2064
2069
  };
2065
2070
  const isTemplateNode = (node) => {
2066
- return node.nodeType === 1 && node.tagName.toLowerCase() === "template";
2071
+ return node.nodeType === 1 && node.tagName === "TEMPLATE";
2067
2072
  };
2068
2073
  return [hydrate, hydrateNode];
2069
2074
  }
@@ -2415,7 +2420,7 @@ function defineAsyncComponent(source) {
2415
2420
  load().then(() => {
2416
2421
  loaded.value = true;
2417
2422
  if (instance.parent && isKeepAlive(instance.parent.vnode)) {
2418
- queueJob(instance.parent.update);
2423
+ instance.parent.update();
2419
2424
  }
2420
2425
  }).catch((err) => {
2421
2426
  onError(err);
@@ -2816,13 +2821,15 @@ function renderList(source, renderItem, cache, index) {
2816
2821
  const sourceIsArray = isArray(source);
2817
2822
  if (sourceIsArray || isString(source)) {
2818
2823
  const sourceIsReactiveArray = sourceIsArray && isReactive(source);
2824
+ let needsWrap = false;
2819
2825
  if (sourceIsReactiveArray) {
2826
+ needsWrap = !isShallow(source);
2820
2827
  source = shallowReadArray(source);
2821
2828
  }
2822
2829
  ret = new Array(source.length);
2823
2830
  for (let i = 0, l = source.length; i < l; i++) {
2824
2831
  ret[i] = renderItem(
2825
- sourceIsReactiveArray ? toReactive(source[i]) : source[i],
2832
+ needsWrap ? toReactive(source[i]) : source[i],
2826
2833
  i,
2827
2834
  void 0,
2828
2835
  cached && cached[i]
@@ -5137,6 +5144,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5137
5144
  }
5138
5145
  }
5139
5146
  if (instance.asyncDep) {
5147
+ if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) initialVNode.el = null;
5140
5148
  parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
5141
5149
  if (!initialVNode.el) {
5142
5150
  const placeholder = instance.subTree = createVNode(Comment);
@@ -8302,7 +8310,7 @@ function isMemoSame(cached, memo) {
8302
8310
  return true;
8303
8311
  }
8304
8312
 
8305
- const version = "3.5.3";
8313
+ const version = "3.5.5";
8306
8314
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8307
8315
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8308
8316
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.5.3",
3
+ "version": "3.5.5",
4
4
  "description": "@vue/runtime-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/runtime-core.esm-bundler.js",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
48
48
  "dependencies": {
49
- "@vue/shared": "3.5.3",
50
- "@vue/reactivity": "3.5.3"
49
+ "@vue/shared": "3.5.5",
50
+ "@vue/reactivity": "3.5.5"
51
51
  }
52
52
  }