@vue/compat 3.4.36 → 3.4.37

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/compat v3.4.36
2
+ * @vue/compat v3.4.37
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -817,7 +817,7 @@ class BaseReactiveHandler {
817
817
  return isShallow2;
818
818
  } else if (key === "__v_raw") {
819
819
  if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
820
- // this means the reciever is a user proxy of the reactive proxy
820
+ // this means the receiver is a user proxy of the reactive proxy
821
821
  Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
822
822
  return target;
823
823
  }
@@ -3480,7 +3480,7 @@ const KeepAliveImpl = {
3480
3480
  }
3481
3481
  function pruneCacheEntry(key) {
3482
3482
  const cached = cache.get(key);
3483
- if (!current || !isSameVNodeType(cached, current)) {
3483
+ if (cached && (!current || !isSameVNodeType(cached, current))) {
3484
3484
  unmount(cached);
3485
3485
  } else if (current) {
3486
3486
  resetShapeFlag(current);
@@ -3542,6 +3542,10 @@ const KeepAliveImpl = {
3542
3542
  return rawVNode;
3543
3543
  }
3544
3544
  let vnode = getInnerChild(rawVNode);
3545
+ if (vnode.type === Comment) {
3546
+ current = null;
3547
+ return vnode;
3548
+ }
3545
3549
  const comp = vnode.type;
3546
3550
  const name = getComponentName(
3547
3551
  isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
@@ -5261,7 +5265,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5261
5265
  return vm;
5262
5266
  }
5263
5267
  }
5264
- Vue.version = `2.6.14-compat:${"3.4.36"}`;
5268
+ Vue.version = `2.6.14-compat:${"3.4.37"}`;
5265
5269
  Vue.config = singletonApp.config;
5266
5270
  Vue.use = (plugin, ...options) => {
5267
5271
  if (plugin && isFunction(plugin.install)) {
@@ -5839,7 +5843,7 @@ function provide(key, value) {
5839
5843
  function inject(key, defaultValue, treatDefaultAsFactory = false) {
5840
5844
  const instance = currentInstance || currentRenderingInstance;
5841
5845
  if (instance || currentApp) {
5842
- const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides;
5846
+ const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
5843
5847
  if (provides && key in provides) {
5844
5848
  return provides[key];
5845
5849
  } else if (arguments.length > 1) {
@@ -8894,13 +8898,13 @@ function baseCreateRenderer(options, createHydrationFns) {
8894
8898
  namespace
8895
8899
  );
8896
8900
  }
8901
+ container._vnode = vnode;
8897
8902
  if (!isFlushing) {
8898
8903
  isFlushing = true;
8899
8904
  flushPreFlushCbs();
8900
8905
  flushPostFlushCbs();
8901
8906
  isFlushing = false;
8902
8907
  }
8903
- container._vnode = vnode;
8904
8908
  };
8905
8909
  const internals = {
8906
8910
  p: patch,
@@ -9338,7 +9342,8 @@ function useModel(props, name, options = EMPTY_OBJ) {
9338
9342
  return options.get ? options.get(localValue) : localValue;
9339
9343
  },
9340
9344
  set(value) {
9341
- if (!hasChanged(value, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
9345
+ const emittedValue = options.set ? options.set(value) : value;
9346
+ if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
9342
9347
  return;
9343
9348
  }
9344
9349
  const rawProps = i.vnode.props;
@@ -9347,7 +9352,6 @@ function useModel(props, name, options = EMPTY_OBJ) {
9347
9352
  localValue = value;
9348
9353
  trigger();
9349
9354
  }
9350
- const emittedValue = options.set ? options.set(value) : value;
9351
9355
  i.emit(`update:${name}`, emittedValue);
9352
9356
  if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
9353
9357
  trigger();
@@ -9385,9 +9389,9 @@ function emit(instance, event, ...rawArgs) {
9385
9389
  } = instance;
9386
9390
  if (emitsOptions) {
9387
9391
  if (!(event in emitsOptions) && !(event.startsWith("hook:") || event.startsWith(compatModelEventPrefix))) {
9388
- if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
9392
+ if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
9389
9393
  warn$1(
9390
- `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
9394
+ `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
9391
9395
  );
9392
9396
  }
9393
9397
  } else {
@@ -11548,7 +11552,7 @@ function isMemoSame(cached, memo) {
11548
11552
  return true;
11549
11553
  }
11550
11554
 
11551
- const version = "3.4.36";
11555
+ const version = "3.4.37";
11552
11556
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
11553
11557
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11554
11558
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -11560,7 +11564,8 @@ const _ssrUtils = {
11560
11564
  setCurrentRenderingInstance,
11561
11565
  isVNode: isVNode,
11562
11566
  normalizeVNode,
11563
- getComponentPublicInstance
11567
+ getComponentPublicInstance,
11568
+ ensureValidVNode
11564
11569
  };
11565
11570
  const ssrUtils = _ssrUtils ;
11566
11571
  const resolveFilter = resolveFilter$1 ;
@@ -12031,8 +12036,10 @@ function useCssVars(getter) {
12031
12036
  setVarsOnVNode(instance.subTree, vars);
12032
12037
  updateTeleports(vars);
12033
12038
  };
12034
- onMounted(() => {
12039
+ onBeforeMount(() => {
12035
12040
  watchPostEffect(setVars);
12041
+ });
12042
+ onMounted(() => {
12036
12043
  const ob = new MutationObserver(setVars);
12037
12044
  ob.observe(instance.subTree.el.parentNode, { childList: true });
12038
12045
  onUnmounted(() => ob.disconnect());
@@ -17702,7 +17709,7 @@ function resolveComponentType(node, context, ssr = false) {
17702
17709
  } else {
17703
17710
  exp = isProp.exp;
17704
17711
  if (!exp) {
17705
- exp = createSimpleExpression(`is`, false, isProp.loc);
17712
+ exp = createSimpleExpression(`is`, false, isProp.arg.loc);
17706
17713
  }
17707
17714
  }
17708
17715
  if (exp) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.4.36
2
+ * @vue/compat v3.4.37
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -820,7 +820,7 @@ var Vue = (function () {
820
820
  return isShallow2;
821
821
  } else if (key === "__v_raw") {
822
822
  if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
823
- // this means the reciever is a user proxy of the reactive proxy
823
+ // this means the receiver is a user proxy of the reactive proxy
824
824
  Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
825
825
  return target;
826
826
  }
@@ -3470,7 +3470,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3470
3470
  }
3471
3471
  function pruneCacheEntry(key) {
3472
3472
  const cached = cache.get(key);
3473
- if (!current || !isSameVNodeType(cached, current)) {
3473
+ if (cached && (!current || !isSameVNodeType(cached, current))) {
3474
3474
  unmount(cached);
3475
3475
  } else if (current) {
3476
3476
  resetShapeFlag(current);
@@ -3532,6 +3532,10 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3532
3532
  return rawVNode;
3533
3533
  }
3534
3534
  let vnode = getInnerChild(rawVNode);
3535
+ if (vnode.type === Comment) {
3536
+ current = null;
3537
+ return vnode;
3538
+ }
3535
3539
  const comp = vnode.type;
3536
3540
  const name = getComponentName(
3537
3541
  isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
@@ -5249,7 +5253,7 @@ If this is a native custom element, make sure to exclude it from component resol
5249
5253
  return vm;
5250
5254
  }
5251
5255
  }
5252
- Vue.version = `2.6.14-compat:${"3.4.36"}`;
5256
+ Vue.version = `2.6.14-compat:${"3.4.37"}`;
5253
5257
  Vue.config = singletonApp.config;
5254
5258
  Vue.use = (plugin, ...options) => {
5255
5259
  if (plugin && isFunction(plugin.install)) {
@@ -5825,7 +5829,7 @@ If you want to remount the same app, move your app creation logic into a factory
5825
5829
  function inject(key, defaultValue, treatDefaultAsFactory = false) {
5826
5830
  const instance = currentInstance || currentRenderingInstance;
5827
5831
  if (instance || currentApp) {
5828
- const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides;
5832
+ const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
5829
5833
  if (provides && key in provides) {
5830
5834
  return provides[key];
5831
5835
  } else if (arguments.length > 1) {
@@ -8831,13 +8835,13 @@ Server rendered element contains fewer child nodes than client vdom.`
8831
8835
  namespace
8832
8836
  );
8833
8837
  }
8838
+ container._vnode = vnode;
8834
8839
  if (!isFlushing) {
8835
8840
  isFlushing = true;
8836
8841
  flushPreFlushCbs();
8837
8842
  flushPostFlushCbs();
8838
8843
  isFlushing = false;
8839
8844
  }
8840
- container._vnode = vnode;
8841
8845
  };
8842
8846
  const internals = {
8843
8847
  p: patch,
@@ -9249,7 +9253,8 @@ Server rendered element contains fewer child nodes than client vdom.`
9249
9253
  return options.get ? options.get(localValue) : localValue;
9250
9254
  },
9251
9255
  set(value) {
9252
- if (!hasChanged(value, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
9256
+ const emittedValue = options.set ? options.set(value) : value;
9257
+ if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
9253
9258
  return;
9254
9259
  }
9255
9260
  const rawProps = i.vnode.props;
@@ -9258,7 +9263,6 @@ Server rendered element contains fewer child nodes than client vdom.`
9258
9263
  localValue = value;
9259
9264
  trigger();
9260
9265
  }
9261
- const emittedValue = options.set ? options.set(value) : value;
9262
9266
  i.emit(`update:${name}`, emittedValue);
9263
9267
  if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
9264
9268
  trigger();
@@ -9296,9 +9300,9 @@ Server rendered element contains fewer child nodes than client vdom.`
9296
9300
  } = instance;
9297
9301
  if (emitsOptions) {
9298
9302
  if (!(event in emitsOptions) && !(event.startsWith("hook:") || event.startsWith(compatModelEventPrefix))) {
9299
- if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
9303
+ if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
9300
9304
  warn$1(
9301
- `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
9305
+ `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
9302
9306
  );
9303
9307
  }
9304
9308
  } else {
@@ -11431,7 +11435,7 @@ Component that was made reactive: `,
11431
11435
  return true;
11432
11436
  }
11433
11437
 
11434
- const version = "3.4.36";
11438
+ const version = "3.4.37";
11435
11439
  const warn = warn$1 ;
11436
11440
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11437
11441
  const devtools = devtools$1 ;
@@ -11898,8 +11902,10 @@ Component that was made reactive: `,
11898
11902
  setVarsOnVNode(instance.subTree, vars);
11899
11903
  updateTeleports(vars);
11900
11904
  };
11901
- onMounted(() => {
11905
+ onBeforeMount(() => {
11902
11906
  watchPostEffect(setVars);
11907
+ });
11908
+ onMounted(() => {
11903
11909
  const ob = new MutationObserver(setVars);
11904
11910
  ob.observe(instance.subTree.el.parentNode, { childList: true });
11905
11911
  onUnmounted(() => ob.disconnect());
@@ -17519,7 +17525,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17519
17525
  } else {
17520
17526
  exp = isProp.exp;
17521
17527
  if (!exp) {
17522
- exp = createSimpleExpression(`is`, false, isProp.loc);
17528
+ exp = createSimpleExpression(`is`, false, isProp.arg.loc);
17523
17529
  }
17524
17530
  }
17525
17531
  if (exp) {