@vue/runtime-core 3.5.3 → 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.3
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;
@@ -2801,13 +2797,15 @@ function renderList(source, renderItem, cache, index) {
2801
2797
  const sourceIsArray = shared.isArray(source);
2802
2798
  if (sourceIsArray || shared.isString(source)) {
2803
2799
  const sourceIsReactiveArray = sourceIsArray && reactivity.isReactive(source);
2800
+ let needsWrap = false;
2804
2801
  if (sourceIsReactiveArray) {
2802
+ needsWrap = !reactivity.isShallow(source);
2805
2803
  source = reactivity.shallowReadArray(source);
2806
2804
  }
2807
2805
  ret = new Array(source.length);
2808
2806
  for (let i = 0, l = source.length; i < l; i++) {
2809
2807
  ret[i] = renderItem(
2810
- sourceIsReactiveArray ? reactivity.toReactive(source[i]) : source[i],
2808
+ needsWrap ? reactivity.toReactive(source[i]) : source[i],
2811
2809
  i,
2812
2810
  void 0,
2813
2811
  cached && cached[i]
@@ -8231,7 +8229,7 @@ function isMemoSame(cached, memo) {
8231
8229
  return true;
8232
8230
  }
8233
8231
 
8234
- const version = "3.5.3";
8232
+ const version = "3.5.4";
8235
8233
  const warn = warn$1 ;
8236
8234
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8237
8235
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.3
2
+ * @vue/runtime-core v3.5.4
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -2143,13 +2143,15 @@ function renderList(source, renderItem, cache, index) {
2143
2143
  const sourceIsArray = shared.isArray(source);
2144
2144
  if (sourceIsArray || shared.isString(source)) {
2145
2145
  const sourceIsReactiveArray = sourceIsArray && reactivity.isReactive(source);
2146
+ let needsWrap = false;
2146
2147
  if (sourceIsReactiveArray) {
2148
+ needsWrap = !reactivity.isShallow(source);
2147
2149
  source = reactivity.shallowReadArray(source);
2148
2150
  }
2149
2151
  ret = new Array(source.length);
2150
2152
  for (let i = 0, l = source.length; i < l; i++) {
2151
2153
  ret[i] = renderItem(
2152
- sourceIsReactiveArray ? reactivity.toReactive(source[i]) : source[i],
2154
+ needsWrap ? reactivity.toReactive(source[i]) : source[i],
2153
2155
  i,
2154
2156
  void 0,
2155
2157
  cached && cached[i]
@@ -6399,7 +6401,7 @@ function isMemoSame(cached, memo) {
6399
6401
  return true;
6400
6402
  }
6401
6403
 
6402
- const version = "3.5.3";
6404
+ const version = "3.5.4";
6403
6405
  const warn$1 = shared.NOOP;
6404
6406
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6405
6407
  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.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;
@@ -2816,13 +2812,15 @@ function renderList(source, renderItem, cache, index) {
2816
2812
  const sourceIsArray = isArray(source);
2817
2813
  if (sourceIsArray || isString(source)) {
2818
2814
  const sourceIsReactiveArray = sourceIsArray && isReactive(source);
2815
+ let needsWrap = false;
2819
2816
  if (sourceIsReactiveArray) {
2817
+ needsWrap = !isShallow(source);
2820
2818
  source = shallowReadArray(source);
2821
2819
  }
2822
2820
  ret = new Array(source.length);
2823
2821
  for (let i = 0, l = source.length; i < l; i++) {
2824
2822
  ret[i] = renderItem(
2825
- sourceIsReactiveArray ? toReactive(source[i]) : source[i],
2823
+ needsWrap ? toReactive(source[i]) : source[i],
2826
2824
  i,
2827
2825
  void 0,
2828
2826
  cached && cached[i]
@@ -8302,7 +8300,7 @@ function isMemoSame(cached, memo) {
8302
8300
  return true;
8303
8301
  }
8304
8302
 
8305
- const version = "3.5.3";
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;
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.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.3",
50
- "@vue/reactivity": "3.5.3"
49
+ "@vue/shared": "3.5.4",
50
+ "@vue/reactivity": "3.5.4"
51
51
  }
52
52
  }