@vue/compat 3.2.36 → 3.2.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.
@@ -4992,7 +4992,7 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
4992
4992
  const Component = instance.type;
4993
4993
  // explicit self name has highest priority
4994
4994
  if (type === COMPONENTS) {
4995
- const selfName = getComponentName(Component);
4995
+ const selfName = getComponentName(Component, false /* do not include inferred name to avoid breaking existing code */);
4996
4996
  if (selfName &&
4997
4997
  (selfName === name ||
4998
4998
  selfName === camelize(name) ||
@@ -7100,7 +7100,7 @@ function createCompatVue(createApp, createSingletonApp) {
7100
7100
  return vm;
7101
7101
  }
7102
7102
  }
7103
- Vue.version = `2.6.14-compat:${"3.2.36"}`;
7103
+ Vue.version = `2.6.14-compat:${"3.2.37"}`;
7104
7104
  Vue.config = singletonApp.config;
7105
7105
  Vue.use = (p, ...options) => {
7106
7106
  if (p && isFunction(p.install)) {
@@ -7761,7 +7761,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
7761
7761
  setupState[ref] = value;
7762
7762
  }
7763
7763
  }
7764
- else if (isRef(ref)) {
7764
+ else if (_isRef) {
7765
7765
  ref.value = value;
7766
7766
  if (rawRef.k)
7767
7767
  refs[rawRef.k] = value;
@@ -7801,11 +7801,13 @@ function createHydrationFunctions(rendererInternals) {
7801
7801
  `Performing full mount instead.`);
7802
7802
  patch(null, vnode, container);
7803
7803
  flushPostFlushCbs();
7804
+ container._vnode = vnode;
7804
7805
  return;
7805
7806
  }
7806
7807
  hasMismatch = false;
7807
7808
  hydrateNode(container.firstChild, vnode, null, null, null);
7808
7809
  flushPostFlushCbs();
7810
+ container._vnode = vnode;
7809
7811
  if (hasMismatch && !false) {
7810
7812
  // this error should show up in production
7811
7813
  console.error(`Hydration completed but contains mismatches.`);
@@ -7856,7 +7858,7 @@ function createHydrationFunctions(rendererInternals) {
7856
7858
  }
7857
7859
  break;
7858
7860
  case Static:
7859
- if (domType !== 1 /* ELEMENT */) {
7861
+ if (domType !== 1 /* ELEMENT */ && domType !== 3 /* TEXT */) {
7860
7862
  nextNode = onMismatch();
7861
7863
  }
7862
7864
  else {
@@ -7867,7 +7869,10 @@ function createHydrationFunctions(rendererInternals) {
7867
7869
  const needToAdoptContent = !vnode.children.length;
7868
7870
  for (let i = 0; i < vnode.staticCount; i++) {
7869
7871
  if (needToAdoptContent)
7870
- vnode.children += nextNode.outerHTML;
7872
+ vnode.children +=
7873
+ nextNode.nodeType === 1 /* ELEMENT */
7874
+ ? nextNode.outerHTML
7875
+ : nextNode.data;
7871
7876
  if (i === vnode.staticCount - 1) {
7872
7877
  vnode.anchor = nextNode;
7873
7878
  }
@@ -10726,10 +10731,10 @@ function getExposeProxy(instance) {
10726
10731
  }
10727
10732
  const classifyRE = /(?:^|[-_])(\w)/g;
10728
10733
  const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
10729
- function getComponentName(Component) {
10734
+ function getComponentName(Component, includeInferred = true) {
10730
10735
  return isFunction(Component)
10731
10736
  ? Component.displayName || Component.name
10732
- : Component.name;
10737
+ : Component.name || (includeInferred && Component.__name);
10733
10738
  }
10734
10739
  /* istanbul ignore next */
10735
10740
  function formatComponentName(instance, Component, isRoot = false) {
@@ -11173,7 +11178,7 @@ function isMemoSame(cached, memo) {
11173
11178
  }
11174
11179
 
11175
11180
  // Core API ------------------------------------------------------------------
11176
- const version = "3.2.36";
11181
+ const version = "3.2.37";
11177
11182
  const _ssrUtils = {
11178
11183
  createComponentInstance,
11179
11184
  setupComponent,
@@ -11183,7 +11188,7 @@ const _ssrUtils = {
11183
11188
  normalizeVNode
11184
11189
  };
11185
11190
  /**
11186
- * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
11191
+ * SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
11187
11192
  * @internal
11188
11193
  */
11189
11194
  const ssrUtils = (_ssrUtils );
@@ -4937,7 +4937,7 @@ var Vue = (function () {
4937
4937
  const Component = instance.type;
4938
4938
  // explicit self name has highest priority
4939
4939
  if (type === COMPONENTS) {
4940
- const selfName = getComponentName(Component);
4940
+ const selfName = getComponentName(Component, false /* do not include inferred name to avoid breaking existing code */);
4941
4941
  if (selfName &&
4942
4942
  (selfName === name ||
4943
4943
  selfName === camelize(name) ||
@@ -7032,7 +7032,7 @@ var Vue = (function () {
7032
7032
  return vm;
7033
7033
  }
7034
7034
  }
7035
- Vue.version = `2.6.14-compat:${"3.2.36"}`;
7035
+ Vue.version = `2.6.14-compat:${"3.2.37"}`;
7036
7036
  Vue.config = singletonApp.config;
7037
7037
  Vue.use = (p, ...options) => {
7038
7038
  if (p && isFunction(p.install)) {
@@ -7688,7 +7688,7 @@ var Vue = (function () {
7688
7688
  setupState[ref] = value;
7689
7689
  }
7690
7690
  }
7691
- else if (isRef(ref)) {
7691
+ else if (_isRef) {
7692
7692
  ref.value = value;
7693
7693
  if (rawRef.k)
7694
7694
  refs[rawRef.k] = value;
@@ -7727,11 +7727,13 @@ var Vue = (function () {
7727
7727
  `Performing full mount instead.`);
7728
7728
  patch(null, vnode, container);
7729
7729
  flushPostFlushCbs();
7730
+ container._vnode = vnode;
7730
7731
  return;
7731
7732
  }
7732
7733
  hasMismatch = false;
7733
7734
  hydrateNode(container.firstChild, vnode, null, null, null);
7734
7735
  flushPostFlushCbs();
7736
+ container._vnode = vnode;
7735
7737
  if (hasMismatch && !false) {
7736
7738
  // this error should show up in production
7737
7739
  console.error(`Hydration completed but contains mismatches.`);
@@ -7781,7 +7783,7 @@ var Vue = (function () {
7781
7783
  }
7782
7784
  break;
7783
7785
  case Static:
7784
- if (domType !== 1 /* ELEMENT */) {
7786
+ if (domType !== 1 /* ELEMENT */ && domType !== 3 /* TEXT */) {
7785
7787
  nextNode = onMismatch();
7786
7788
  }
7787
7789
  else {
@@ -7792,7 +7794,10 @@ var Vue = (function () {
7792
7794
  const needToAdoptContent = !vnode.children.length;
7793
7795
  for (let i = 0; i < vnode.staticCount; i++) {
7794
7796
  if (needToAdoptContent)
7795
- vnode.children += nextNode.outerHTML;
7797
+ vnode.children +=
7798
+ nextNode.nodeType === 1 /* ELEMENT */
7799
+ ? nextNode.outerHTML
7800
+ : nextNode.data;
7796
7801
  if (i === vnode.staticCount - 1) {
7797
7802
  vnode.anchor = nextNode;
7798
7803
  }
@@ -10576,10 +10581,10 @@ var Vue = (function () {
10576
10581
  }
10577
10582
  const classifyRE = /(?:^|[-_])(\w)/g;
10578
10583
  const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
10579
- function getComponentName(Component) {
10584
+ function getComponentName(Component, includeInferred = true) {
10580
10585
  return isFunction(Component)
10581
10586
  ? Component.displayName || Component.name
10582
- : Component.name;
10587
+ : Component.name || (includeInferred && Component.__name);
10583
10588
  }
10584
10589
  /* istanbul ignore next */
10585
10590
  function formatComponentName(instance, Component, isRoot = false) {
@@ -11018,9 +11023,9 @@ var Vue = (function () {
11018
11023
  }
11019
11024
 
11020
11025
  // Core API ------------------------------------------------------------------
11021
- const version = "3.2.36";
11026
+ const version = "3.2.37";
11022
11027
  /**
11023
- * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
11028
+ * SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
11024
11029
  * @internal
11025
11030
  */
11026
11031
  const ssrUtils = (null);