@vue/compat 3.3.7 → 3.3.8

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.
@@ -2999,6 +2999,65 @@ function updateHOCHostEl({ vnode, parent }, el) {
2999
2999
  }
3000
3000
  }
3001
3001
 
3002
+ const COMPONENTS = "components";
3003
+ const DIRECTIVES = "directives";
3004
+ const FILTERS = "filters";
3005
+ function resolveComponent(name, maybeSelfReference) {
3006
+ return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
3007
+ }
3008
+ const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
3009
+ function resolveDynamicComponent(component) {
3010
+ if (isString(component)) {
3011
+ return resolveAsset(COMPONENTS, component, false) || component;
3012
+ } else {
3013
+ return component || NULL_DYNAMIC_COMPONENT;
3014
+ }
3015
+ }
3016
+ function resolveDirective(name) {
3017
+ return resolveAsset(DIRECTIVES, name);
3018
+ }
3019
+ function resolveFilter$1(name) {
3020
+ return resolveAsset(FILTERS, name);
3021
+ }
3022
+ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
3023
+ const instance = currentRenderingInstance || currentInstance;
3024
+ if (instance) {
3025
+ const Component = instance.type;
3026
+ if (type === COMPONENTS) {
3027
+ const selfName = getComponentName(
3028
+ Component,
3029
+ false
3030
+ /* do not include inferred name to avoid breaking existing code */
3031
+ );
3032
+ if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
3033
+ return Component;
3034
+ }
3035
+ }
3036
+ const res = (
3037
+ // local registration
3038
+ // check instance[type] first which is resolved for options API
3039
+ resolve(instance[type] || Component[type], name) || // global registration
3040
+ resolve(instance.appContext[type], name)
3041
+ );
3042
+ if (!res && maybeSelfReference) {
3043
+ return Component;
3044
+ }
3045
+ if (!!(process.env.NODE_ENV !== "production") && warnMissing && !res) {
3046
+ const extra = type === COMPONENTS ? `
3047
+ If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
3048
+ warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
3049
+ }
3050
+ return res;
3051
+ } else if (!!(process.env.NODE_ENV !== "production")) {
3052
+ warn(
3053
+ `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
3054
+ );
3055
+ }
3056
+ }
3057
+ function resolve(registry, name) {
3058
+ return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
3059
+ }
3060
+
3002
3061
  const isSuspense = (type) => type.__isSuspense;
3003
3062
  const SuspenseImpl = {
3004
3063
  name: "Suspense",
@@ -3533,7 +3592,7 @@ function normalizeSuspenseSlot(s) {
3533
3592
  }
3534
3593
  if (isArray(s)) {
3535
3594
  const singleChild = filterSingleRoot(s);
3536
- if (!!(process.env.NODE_ENV !== "production") && !singleChild) {
3595
+ if (!!(process.env.NODE_ENV !== "production") && !singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
3537
3596
  warn(`<Suspense> slots expect a single root node.`);
3538
3597
  }
3539
3598
  s = singleChild;
@@ -4739,65 +4798,6 @@ function getCompatListeners(instance) {
4739
4798
  return listeners;
4740
4799
  }
4741
4800
 
4742
- const COMPONENTS = "components";
4743
- const DIRECTIVES = "directives";
4744
- const FILTERS = "filters";
4745
- function resolveComponent(name, maybeSelfReference) {
4746
- return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
4747
- }
4748
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
4749
- function resolveDynamicComponent(component) {
4750
- if (isString(component)) {
4751
- return resolveAsset(COMPONENTS, component, false) || component;
4752
- } else {
4753
- return component || NULL_DYNAMIC_COMPONENT;
4754
- }
4755
- }
4756
- function resolveDirective(name) {
4757
- return resolveAsset(DIRECTIVES, name);
4758
- }
4759
- function resolveFilter$1(name) {
4760
- return resolveAsset(FILTERS, name);
4761
- }
4762
- function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
4763
- const instance = currentRenderingInstance || currentInstance;
4764
- if (instance) {
4765
- const Component = instance.type;
4766
- if (type === COMPONENTS) {
4767
- const selfName = getComponentName(
4768
- Component,
4769
- false
4770
- /* do not include inferred name to avoid breaking existing code */
4771
- );
4772
- if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
4773
- return Component;
4774
- }
4775
- }
4776
- const res = (
4777
- // local registration
4778
- // check instance[type] first which is resolved for options API
4779
- resolve(instance[type] || Component[type], name) || // global registration
4780
- resolve(instance.appContext[type], name)
4781
- );
4782
- if (!res && maybeSelfReference) {
4783
- return Component;
4784
- }
4785
- if (!!(process.env.NODE_ENV !== "production") && warnMissing && !res) {
4786
- const extra = type === COMPONENTS ? `
4787
- If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
4788
- warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
4789
- }
4790
- return res;
4791
- } else if (!!(process.env.NODE_ENV !== "production")) {
4792
- warn(
4793
- `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
4794
- );
4795
- }
4796
- }
4797
- function resolve(registry, name) {
4798
- return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
4799
- }
4800
-
4801
4801
  function convertLegacyRenderFn(instance) {
4802
4802
  const Component2 = instance.type;
4803
4803
  const render = Component2.render;
@@ -6302,7 +6302,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6302
6302
  return vm;
6303
6303
  }
6304
6304
  }
6305
- Vue.version = `2.6.14-compat:${"3.3.7"}`;
6305
+ Vue.version = `2.6.14-compat:${"3.3.8"}`;
6306
6306
  Vue.config = singletonApp.config;
6307
6307
  Vue.use = (p, ...options) => {
6308
6308
  if (p && isFunction(p.install)) {
@@ -7634,15 +7634,15 @@ function createHydrationFunctions(rendererInternals) {
7634
7634
  }
7635
7635
  break;
7636
7636
  case Comment:
7637
- if (domType !== 8 /* COMMENT */ || isFragmentStart) {
7638
- if (node.tagName.toLowerCase() === "template") {
7639
- const content = vnode.el.content.firstChild;
7640
- replaceNode(content, node, parentComponent);
7641
- vnode.el = node = content;
7642
- nextNode = nextSibling(node);
7643
- } else {
7644
- nextNode = onMismatch();
7645
- }
7637
+ if (isTemplateNode(node)) {
7638
+ nextNode = nextSibling(node);
7639
+ replaceNode(
7640
+ vnode.el = node.content.firstChild,
7641
+ node,
7642
+ parentComponent
7643
+ );
7644
+ } else if (domType !== 8 /* COMMENT */ || isFragmentStart) {
7645
+ nextNode = onMismatch();
7646
7646
  } else {
7647
7647
  nextNode = nextSibling(node);
7648
7648
  }
@@ -7986,8 +7986,7 @@ function createHydrationFunctions(rendererInternals) {
7986
7986
  let parent = parentComponent;
7987
7987
  while (parent) {
7988
7988
  if (parent.vnode.el === oldNode) {
7989
- parent.vnode.el = newNode;
7990
- parent.subTree.el = newNode;
7989
+ parent.vnode.el = parent.subTree.el = newNode;
7991
7990
  }
7992
7991
  parent = parent.parent;
7993
7992
  }
@@ -10942,7 +10941,7 @@ function isMemoSame(cached, memo) {
10942
10941
  return true;
10943
10942
  }
10944
10943
 
10945
- const version = "3.3.7";
10944
+ const version = "3.3.8";
10946
10945
  const _ssrUtils = {
10947
10946
  createComponentInstance,
10948
10947
  setupComponent,
@@ -2985,6 +2985,65 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
2985
2985
  }
2986
2986
  }
2987
2987
 
2988
+ const COMPONENTS = "components";
2989
+ const DIRECTIVES = "directives";
2990
+ const FILTERS = "filters";
2991
+ function resolveComponent(name, maybeSelfReference) {
2992
+ return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
2993
+ }
2994
+ const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
2995
+ function resolveDynamicComponent(component) {
2996
+ if (isString(component)) {
2997
+ return resolveAsset(COMPONENTS, component, false) || component;
2998
+ } else {
2999
+ return component || NULL_DYNAMIC_COMPONENT;
3000
+ }
3001
+ }
3002
+ function resolveDirective(name) {
3003
+ return resolveAsset(DIRECTIVES, name);
3004
+ }
3005
+ function resolveFilter$1(name) {
3006
+ return resolveAsset(FILTERS, name);
3007
+ }
3008
+ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
3009
+ const instance = currentRenderingInstance || currentInstance;
3010
+ if (instance) {
3011
+ const Component = instance.type;
3012
+ if (type === COMPONENTS) {
3013
+ const selfName = getComponentName(
3014
+ Component,
3015
+ false
3016
+ /* do not include inferred name to avoid breaking existing code */
3017
+ );
3018
+ if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
3019
+ return Component;
3020
+ }
3021
+ }
3022
+ const res = (
3023
+ // local registration
3024
+ // check instance[type] first which is resolved for options API
3025
+ resolve(instance[type] || Component[type], name) || // global registration
3026
+ resolve(instance.appContext[type], name)
3027
+ );
3028
+ if (!res && maybeSelfReference) {
3029
+ return Component;
3030
+ }
3031
+ if (warnMissing && !res) {
3032
+ const extra = type === COMPONENTS ? `
3033
+ If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
3034
+ warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
3035
+ }
3036
+ return res;
3037
+ } else {
3038
+ warn(
3039
+ `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
3040
+ );
3041
+ }
3042
+ }
3043
+ function resolve(registry, name) {
3044
+ return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
3045
+ }
3046
+
2988
3047
  const isSuspense = (type) => type.__isSuspense;
2989
3048
  const SuspenseImpl = {
2990
3049
  name: "Suspense",
@@ -3519,7 +3578,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3519
3578
  }
3520
3579
  if (isArray(s)) {
3521
3580
  const singleChild = filterSingleRoot(s);
3522
- if (!singleChild) {
3581
+ if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
3523
3582
  warn(`<Suspense> slots expect a single root node.`);
3524
3583
  }
3525
3584
  s = singleChild;
@@ -4696,65 +4755,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4696
4755
  return listeners;
4697
4756
  }
4698
4757
 
4699
- const COMPONENTS = "components";
4700
- const DIRECTIVES = "directives";
4701
- const FILTERS = "filters";
4702
- function resolveComponent(name, maybeSelfReference) {
4703
- return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
4704
- }
4705
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
4706
- function resolveDynamicComponent(component) {
4707
- if (isString(component)) {
4708
- return resolveAsset(COMPONENTS, component, false) || component;
4709
- } else {
4710
- return component || NULL_DYNAMIC_COMPONENT;
4711
- }
4712
- }
4713
- function resolveDirective(name) {
4714
- return resolveAsset(DIRECTIVES, name);
4715
- }
4716
- function resolveFilter$1(name) {
4717
- return resolveAsset(FILTERS, name);
4718
- }
4719
- function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
4720
- const instance = currentRenderingInstance || currentInstance;
4721
- if (instance) {
4722
- const Component = instance.type;
4723
- if (type === COMPONENTS) {
4724
- const selfName = getComponentName(
4725
- Component,
4726
- false
4727
- /* do not include inferred name to avoid breaking existing code */
4728
- );
4729
- if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
4730
- return Component;
4731
- }
4732
- }
4733
- const res = (
4734
- // local registration
4735
- // check instance[type] first which is resolved for options API
4736
- resolve(instance[type] || Component[type], name) || // global registration
4737
- resolve(instance.appContext[type], name)
4738
- );
4739
- if (!res && maybeSelfReference) {
4740
- return Component;
4741
- }
4742
- if (warnMissing && !res) {
4743
- const extra = type === COMPONENTS ? `
4744
- If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
4745
- warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
4746
- }
4747
- return res;
4748
- } else {
4749
- warn(
4750
- `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
4751
- );
4752
- }
4753
- }
4754
- function resolve(registry, name) {
4755
- return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
4756
- }
4757
-
4758
4758
  function convertLegacyRenderFn(instance) {
4759
4759
  const Component2 = instance.type;
4760
4760
  const render = Component2.render;
@@ -6257,7 +6257,7 @@ If this is a native custom element, make sure to exclude it from component resol
6257
6257
  return vm;
6258
6258
  }
6259
6259
  }
6260
- Vue.version = `2.6.14-compat:${"3.3.7"}`;
6260
+ Vue.version = `2.6.14-compat:${"3.3.8"}`;
6261
6261
  Vue.config = singletonApp.config;
6262
6262
  Vue.use = (p, ...options) => {
6263
6263
  if (p && isFunction(p.install)) {
@@ -7586,15 +7586,15 @@ If you want to remount the same app, move your app creation logic into a factory
7586
7586
  }
7587
7587
  break;
7588
7588
  case Comment:
7589
- if (domType !== 8 /* COMMENT */ || isFragmentStart) {
7590
- if (node.tagName.toLowerCase() === "template") {
7591
- const content = vnode.el.content.firstChild;
7592
- replaceNode(content, node, parentComponent);
7593
- vnode.el = node = content;
7594
- nextNode = nextSibling(node);
7595
- } else {
7596
- nextNode = onMismatch();
7597
- }
7589
+ if (isTemplateNode(node)) {
7590
+ nextNode = nextSibling(node);
7591
+ replaceNode(
7592
+ vnode.el = node.content.firstChild,
7593
+ node,
7594
+ parentComponent
7595
+ );
7596
+ } else if (domType !== 8 /* COMMENT */ || isFragmentStart) {
7597
+ nextNode = onMismatch();
7598
7598
  } else {
7599
7599
  nextNode = nextSibling(node);
7600
7600
  }
@@ -7938,8 +7938,7 @@ If you want to remount the same app, move your app creation logic into a factory
7938
7938
  let parent = parentComponent;
7939
7939
  while (parent) {
7940
7940
  if (parent.vnode.el === oldNode) {
7941
- parent.vnode.el = newNode;
7942
- parent.subTree.el = newNode;
7941
+ parent.vnode.el = parent.subTree.el = newNode;
7943
7942
  }
7944
7943
  parent = parent.parent;
7945
7944
  }
@@ -10826,7 +10825,7 @@ Component that was made reactive: `,
10826
10825
  return true;
10827
10826
  }
10828
10827
 
10829
- const version = "3.3.7";
10828
+ const version = "3.3.8";
10830
10829
  const ssrUtils = null;
10831
10830
  const resolveFilter = resolveFilter$1 ;
10832
10831
  const _compatUtils = {