@vue/runtime-core 3.5.2 → 3.5.4

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.2
2
+ * @vue/runtime-core v3.5.4
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;
@@ -1399,6 +1395,7 @@ function getInnerChild$1(vnode) {
1399
1395
  }
1400
1396
  function setTransitionHooks(vnode, hooks) {
1401
1397
  if (vnode.shapeFlag & 6 && vnode.component) {
1398
+ vnode.transition = hooks;
1402
1399
  setTransitionHooks(vnode.component.subTree, hooks);
1403
1400
  } else if (vnode.shapeFlag & 128) {
1404
1401
  vnode.ssContent.transition = hooks.clone(vnode.ssContent);
@@ -1443,7 +1440,7 @@ function defineComponent(options, extraOptions) {
1443
1440
  function useId() {
1444
1441
  const i = getCurrentInstance();
1445
1442
  if (i) {
1446
- return (i.appContext.config.idPrefix || "v") + ":" + i.ids[0] + i.ids[1]++;
1443
+ return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++;
1447
1444
  } else {
1448
1445
  warn$1(
1449
1446
  `useId() is called when there is no active component instance to be associated with.`
@@ -2800,13 +2797,15 @@ function renderList(source, renderItem, cache, index) {
2800
2797
  const sourceIsArray = shared.isArray(source);
2801
2798
  if (sourceIsArray || shared.isString(source)) {
2802
2799
  const sourceIsReactiveArray = sourceIsArray && reactivity.isReactive(source);
2800
+ let needsWrap = false;
2803
2801
  if (sourceIsReactiveArray) {
2802
+ needsWrap = !reactivity.isShallow(source);
2804
2803
  source = reactivity.shallowReadArray(source);
2805
2804
  }
2806
2805
  ret = new Array(source.length);
2807
2806
  for (let i = 0, l = source.length; i < l; i++) {
2808
2807
  ret[i] = renderItem(
2809
- sourceIsReactiveArray ? reactivity.toReactive(source[i]) : source[i],
2808
+ needsWrap ? reactivity.toReactive(source[i]) : source[i],
2810
2809
  i,
2811
2810
  void 0,
2812
2811
  cached && cached[i]
@@ -5159,7 +5158,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5159
5158
  endMeasure(instance, `hydrate`);
5160
5159
  }
5161
5160
  };
5162
- if (isAsyncWrapperVNode) {
5161
+ if (isAsyncWrapperVNode && type.__asyncHydrate) {
5163
5162
  type.__asyncHydrate(
5164
5163
  el,
5165
5164
  instance,
@@ -6330,8 +6329,7 @@ function renderComponentRoot(instance) {
6330
6329
  data,
6331
6330
  setupState,
6332
6331
  ctx,
6333
- inheritAttrs,
6334
- isMounted
6332
+ inheritAttrs
6335
6333
  } = instance;
6336
6334
  const prev = setCurrentRenderingInstance(instance);
6337
6335
  let result;
@@ -6451,7 +6449,7 @@ function renderComponentRoot(instance) {
6451
6449
  `Component inside <Transition> renders non-element root node that cannot be animated.`
6452
6450
  );
6453
6451
  }
6454
- root.transition = isMounted ? vnode.component.subTree.transition : vnode.transition;
6452
+ setTransitionHooks(root, vnode.transition);
6455
6453
  }
6456
6454
  if (setRoot) {
6457
6455
  setRoot(root);
@@ -8231,7 +8229,7 @@ function isMemoSame(cached, memo) {
8231
8229
  return true;
8232
8230
  }
8233
8231
 
8234
- const version = "3.5.2";
8232
+ const version = "3.5.4";
8235
8233
  const warn = warn$1 ;
8236
8234
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8237
8235
  const devtools = devtools$1 ;
@@ -8244,7 +8242,9 @@ const _ssrUtils = {
8244
8242
  isVNode: isVNode,
8245
8243
  normalizeVNode,
8246
8244
  getComponentPublicInstance,
8247
- ensureValidVNode
8245
+ ensureValidVNode,
8246
+ pushWarningContext,
8247
+ popWarningContext
8248
8248
  };
8249
8249
  const ssrUtils = _ssrUtils ;
8250
8250
  const resolveFilter = null;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.2
2
+ * @vue/runtime-core v3.5.4
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -10,6 +10,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
10
10
  var reactivity = require('@vue/reactivity');
11
11
  var shared = require('@vue/shared');
12
12
 
13
+ function pushWarningContext(vnode) {
14
+ }
15
+ function popWarningContext() {
16
+ }
13
17
  function assertNumber(val, type) {
14
18
  return;
15
19
  }
@@ -967,6 +971,7 @@ function getInnerChild$1(vnode) {
967
971
  }
968
972
  function setTransitionHooks(vnode, hooks) {
969
973
  if (vnode.shapeFlag & 6 && vnode.component) {
974
+ vnode.transition = hooks;
970
975
  setTransitionHooks(vnode.component.subTree, hooks);
971
976
  } else if (vnode.shapeFlag & 128) {
972
977
  vnode.ssContent.transition = hooks.clone(vnode.ssContent);
@@ -1011,7 +1016,7 @@ function defineComponent(options, extraOptions) {
1011
1016
  function useId() {
1012
1017
  const i = getCurrentInstance();
1013
1018
  if (i) {
1014
- return (i.appContext.config.idPrefix || "v") + ":" + i.ids[0] + i.ids[1]++;
1019
+ return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++;
1015
1020
  }
1016
1021
  }
1017
1022
  function markAsyncBoundary(instance) {
@@ -2138,13 +2143,15 @@ function renderList(source, renderItem, cache, index) {
2138
2143
  const sourceIsArray = shared.isArray(source);
2139
2144
  if (sourceIsArray || shared.isString(source)) {
2140
2145
  const sourceIsReactiveArray = sourceIsArray && reactivity.isReactive(source);
2146
+ let needsWrap = false;
2141
2147
  if (sourceIsReactiveArray) {
2148
+ needsWrap = !reactivity.isShallow(source);
2142
2149
  source = reactivity.shallowReadArray(source);
2143
2150
  }
2144
2151
  ret = new Array(source.length);
2145
2152
  for (let i = 0, l = source.length; i < l; i++) {
2146
2153
  ret[i] = renderItem(
2147
- sourceIsReactiveArray ? reactivity.toReactive(source[i]) : source[i],
2154
+ needsWrap ? reactivity.toReactive(source[i]) : source[i],
2148
2155
  i,
2149
2156
  void 0,
2150
2157
  cached && cached[i]
@@ -3928,7 +3935,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3928
3935
  null
3929
3936
  );
3930
3937
  };
3931
- if (isAsyncWrapperVNode) {
3938
+ if (isAsyncWrapperVNode && type.__asyncHydrate) {
3932
3939
  type.__asyncHydrate(
3933
3940
  el,
3934
3941
  instance,
@@ -4956,8 +4963,7 @@ function renderComponentRoot(instance) {
4956
4963
  data,
4957
4964
  setupState,
4958
4965
  ctx,
4959
- inheritAttrs,
4960
- isMounted
4966
+ inheritAttrs
4961
4967
  } = instance;
4962
4968
  const prev = setCurrentRenderingInstance(instance);
4963
4969
  let result;
@@ -5034,7 +5040,7 @@ function renderComponentRoot(instance) {
5034
5040
  root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
5035
5041
  }
5036
5042
  if (vnode.transition) {
5037
- root.transition = isMounted ? vnode.component.subTree.transition : vnode.transition;
5043
+ setTransitionHooks(root, vnode.transition);
5038
5044
  }
5039
5045
  {
5040
5046
  result = root;
@@ -6395,7 +6401,7 @@ function isMemoSame(cached, memo) {
6395
6401
  return true;
6396
6402
  }
6397
6403
 
6398
- const version = "3.5.2";
6404
+ const version = "3.5.4";
6399
6405
  const warn$1 = shared.NOOP;
6400
6406
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6401
6407
  const devtools = void 0;
@@ -6408,7 +6414,9 @@ const _ssrUtils = {
6408
6414
  isVNode: isVNode,
6409
6415
  normalizeVNode,
6410
6416
  getComponentPublicInstance,
6411
- ensureValidVNode
6417
+ ensureValidVNode,
6418
+ pushWarningContext,
6419
+ popWarningContext
6412
6420
  };
6413
6421
  const ssrUtils = _ssrUtils ;
6414
6422
  const resolveFilter = null;
@@ -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.2
2
+ * @vue/runtime-core v3.5.4
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;
@@ -1403,6 +1399,7 @@ function getInnerChild$1(vnode) {
1403
1399
  }
1404
1400
  function setTransitionHooks(vnode, hooks) {
1405
1401
  if (vnode.shapeFlag & 6 && vnode.component) {
1402
+ vnode.transition = hooks;
1406
1403
  setTransitionHooks(vnode.component.subTree, hooks);
1407
1404
  } else if (vnode.shapeFlag & 128) {
1408
1405
  vnode.ssContent.transition = hooks.clone(vnode.ssContent);
@@ -1447,7 +1444,7 @@ function defineComponent(options, extraOptions) {
1447
1444
  function useId() {
1448
1445
  const i = getCurrentInstance();
1449
1446
  if (i) {
1450
- return (i.appContext.config.idPrefix || "v") + ":" + i.ids[0] + i.ids[1]++;
1447
+ return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++;
1451
1448
  } else if (!!(process.env.NODE_ENV !== "production")) {
1452
1449
  warn$1(
1453
1450
  `useId() is called when there is no active component instance to be associated with.`
@@ -2815,13 +2812,15 @@ function renderList(source, renderItem, cache, index) {
2815
2812
  const sourceIsArray = isArray(source);
2816
2813
  if (sourceIsArray || isString(source)) {
2817
2814
  const sourceIsReactiveArray = sourceIsArray && isReactive(source);
2815
+ let needsWrap = false;
2818
2816
  if (sourceIsReactiveArray) {
2817
+ needsWrap = !isShallow(source);
2819
2818
  source = shallowReadArray(source);
2820
2819
  }
2821
2820
  ret = new Array(source.length);
2822
2821
  for (let i = 0, l = source.length; i < l; i++) {
2823
2822
  ret[i] = renderItem(
2824
- sourceIsReactiveArray ? toReactive(source[i]) : source[i],
2823
+ needsWrap ? toReactive(source[i]) : source[i],
2825
2824
  i,
2826
2825
  void 0,
2827
2826
  cached && cached[i]
@@ -5216,7 +5215,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5216
5215
  endMeasure(instance, `hydrate`);
5217
5216
  }
5218
5217
  };
5219
- if (isAsyncWrapperVNode) {
5218
+ if (isAsyncWrapperVNode && type.__asyncHydrate) {
5220
5219
  type.__asyncHydrate(
5221
5220
  el,
5222
5221
  instance,
@@ -6387,8 +6386,7 @@ function renderComponentRoot(instance) {
6387
6386
  data,
6388
6387
  setupState,
6389
6388
  ctx,
6390
- inheritAttrs,
6391
- isMounted
6389
+ inheritAttrs
6392
6390
  } = instance;
6393
6391
  const prev = setCurrentRenderingInstance(instance);
6394
6392
  let result;
@@ -6508,7 +6506,7 @@ function renderComponentRoot(instance) {
6508
6506
  `Component inside <Transition> renders non-element root node that cannot be animated.`
6509
6507
  );
6510
6508
  }
6511
- root.transition = isMounted ? vnode.component.subTree.transition : vnode.transition;
6509
+ setTransitionHooks(root, vnode.transition);
6512
6510
  }
6513
6511
  if (!!(process.env.NODE_ENV !== "production") && setRoot) {
6514
6512
  setRoot(root);
@@ -8302,7 +8300,7 @@ function isMemoSame(cached, memo) {
8302
8300
  return true;
8303
8301
  }
8304
8302
 
8305
- const version = "3.5.2";
8303
+ const version = "3.5.4";
8306
8304
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8307
8305
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8308
8306
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -8315,7 +8313,9 @@ const _ssrUtils = {
8315
8313
  isVNode: isVNode,
8316
8314
  normalizeVNode,
8317
8315
  getComponentPublicInstance,
8318
- ensureValidVNode
8316
+ ensureValidVNode,
8317
+ pushWarningContext,
8318
+ popWarningContext
8319
8319
  };
8320
8320
  const ssrUtils = _ssrUtils ;
8321
8321
  const resolveFilter = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.5.2",
3
+ "version": "3.5.4",
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.2",
50
- "@vue/reactivity": "3.5.2"
49
+ "@vue/shared": "3.5.4",
50
+ "@vue/reactivity": "3.5.4"
51
51
  }
52
52
  }