@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.
@@ -2934,6 +2934,65 @@ function updateHOCHostEl({ vnode, parent }, el) {
2934
2934
  }
2935
2935
  }
2936
2936
 
2937
+ const COMPONENTS = "components";
2938
+ const DIRECTIVES = "directives";
2939
+ const FILTERS = "filters";
2940
+ function resolveComponent(name, maybeSelfReference) {
2941
+ return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
2942
+ }
2943
+ const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
2944
+ function resolveDynamicComponent(component) {
2945
+ if (isString(component)) {
2946
+ return resolveAsset(COMPONENTS, component, false) || component;
2947
+ } else {
2948
+ return component || NULL_DYNAMIC_COMPONENT;
2949
+ }
2950
+ }
2951
+ function resolveDirective(name) {
2952
+ return resolveAsset(DIRECTIVES, name);
2953
+ }
2954
+ function resolveFilter$1(name) {
2955
+ return resolveAsset(FILTERS, name);
2956
+ }
2957
+ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
2958
+ const instance = currentRenderingInstance || currentInstance;
2959
+ if (instance) {
2960
+ const Component = instance.type;
2961
+ if (type === COMPONENTS) {
2962
+ const selfName = getComponentName(
2963
+ Component,
2964
+ false
2965
+ /* do not include inferred name to avoid breaking existing code */
2966
+ );
2967
+ if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
2968
+ return Component;
2969
+ }
2970
+ }
2971
+ const res = (
2972
+ // local registration
2973
+ // check instance[type] first which is resolved for options API
2974
+ resolve(instance[type] || Component[type], name) || // global registration
2975
+ resolve(instance.appContext[type], name)
2976
+ );
2977
+ if (!res && maybeSelfReference) {
2978
+ return Component;
2979
+ }
2980
+ if (!!(process.env.NODE_ENV !== "production") && warnMissing && !res) {
2981
+ const extra = type === COMPONENTS ? `
2982
+ If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
2983
+ warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
2984
+ }
2985
+ return res;
2986
+ } else if (!!(process.env.NODE_ENV !== "production")) {
2987
+ warn(
2988
+ `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
2989
+ );
2990
+ }
2991
+ }
2992
+ function resolve(registry, name) {
2993
+ return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
2994
+ }
2995
+
2937
2996
  const isSuspense = (type) => type.__isSuspense;
2938
2997
  const SuspenseImpl = {
2939
2998
  name: "Suspense",
@@ -3468,7 +3527,7 @@ function normalizeSuspenseSlot(s) {
3468
3527
  }
3469
3528
  if (isArray(s)) {
3470
3529
  const singleChild = filterSingleRoot(s);
3471
- if (!!(process.env.NODE_ENV !== "production") && !singleChild) {
3530
+ if (!!(process.env.NODE_ENV !== "production") && !singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
3472
3531
  warn(`<Suspense> slots expect a single root node.`);
3473
3532
  }
3474
3533
  s = singleChild;
@@ -4674,65 +4733,6 @@ function getCompatListeners(instance) {
4674
4733
  return listeners;
4675
4734
  }
4676
4735
 
4677
- const COMPONENTS = "components";
4678
- const DIRECTIVES = "directives";
4679
- const FILTERS = "filters";
4680
- function resolveComponent(name, maybeSelfReference) {
4681
- return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
4682
- }
4683
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
4684
- function resolveDynamicComponent(component) {
4685
- if (isString(component)) {
4686
- return resolveAsset(COMPONENTS, component, false) || component;
4687
- } else {
4688
- return component || NULL_DYNAMIC_COMPONENT;
4689
- }
4690
- }
4691
- function resolveDirective(name) {
4692
- return resolveAsset(DIRECTIVES, name);
4693
- }
4694
- function resolveFilter$1(name) {
4695
- return resolveAsset(FILTERS, name);
4696
- }
4697
- function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
4698
- const instance = currentRenderingInstance || currentInstance;
4699
- if (instance) {
4700
- const Component = instance.type;
4701
- if (type === COMPONENTS) {
4702
- const selfName = getComponentName(
4703
- Component,
4704
- false
4705
- /* do not include inferred name to avoid breaking existing code */
4706
- );
4707
- if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
4708
- return Component;
4709
- }
4710
- }
4711
- const res = (
4712
- // local registration
4713
- // check instance[type] first which is resolved for options API
4714
- resolve(instance[type] || Component[type], name) || // global registration
4715
- resolve(instance.appContext[type], name)
4716
- );
4717
- if (!res && maybeSelfReference) {
4718
- return Component;
4719
- }
4720
- if (!!(process.env.NODE_ENV !== "production") && warnMissing && !res) {
4721
- const extra = type === COMPONENTS ? `
4722
- If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
4723
- warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
4724
- }
4725
- return res;
4726
- } else if (!!(process.env.NODE_ENV !== "production")) {
4727
- warn(
4728
- `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
4729
- );
4730
- }
4731
- }
4732
- function resolve(registry, name) {
4733
- return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
4734
- }
4735
-
4736
4736
  function convertLegacyRenderFn(instance) {
4737
4737
  const Component2 = instance.type;
4738
4738
  const render = Component2.render;
@@ -6237,7 +6237,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6237
6237
  return vm;
6238
6238
  }
6239
6239
  }
6240
- Vue.version = `2.6.14-compat:${"3.3.7"}`;
6240
+ Vue.version = `2.6.14-compat:${"3.3.8"}`;
6241
6241
  Vue.config = singletonApp.config;
6242
6242
  Vue.use = (p, ...options) => {
6243
6243
  if (p && isFunction(p.install)) {
@@ -7569,15 +7569,15 @@ function createHydrationFunctions(rendererInternals) {
7569
7569
  }
7570
7570
  break;
7571
7571
  case Comment:
7572
- if (domType !== 8 /* COMMENT */ || isFragmentStart) {
7573
- if (node.tagName.toLowerCase() === "template") {
7574
- const content = vnode.el.content.firstChild;
7575
- replaceNode(content, node, parentComponent);
7576
- vnode.el = node = content;
7577
- nextNode = nextSibling(node);
7578
- } else {
7579
- nextNode = onMismatch();
7580
- }
7572
+ if (isTemplateNode(node)) {
7573
+ nextNode = nextSibling(node);
7574
+ replaceNode(
7575
+ vnode.el = node.content.firstChild,
7576
+ node,
7577
+ parentComponent
7578
+ );
7579
+ } else if (domType !== 8 /* COMMENT */ || isFragmentStart) {
7580
+ nextNode = onMismatch();
7581
7581
  } else {
7582
7582
  nextNode = nextSibling(node);
7583
7583
  }
@@ -7921,8 +7921,7 @@ function createHydrationFunctions(rendererInternals) {
7921
7921
  let parent = parentComponent;
7922
7922
  while (parent) {
7923
7923
  if (parent.vnode.el === oldNode) {
7924
- parent.vnode.el = newNode;
7925
- parent.subTree.el = newNode;
7924
+ parent.vnode.el = parent.subTree.el = newNode;
7926
7925
  }
7927
7926
  parent = parent.parent;
7928
7927
  }
@@ -10877,7 +10876,7 @@ function isMemoSame(cached, memo) {
10877
10876
  return true;
10878
10877
  }
10879
10878
 
10880
- const version = "3.3.7";
10879
+ const version = "3.3.8";
10881
10880
  const _ssrUtils = {
10882
10881
  createComponentInstance,
10883
10882
  setupComponent,
@@ -2920,6 +2920,65 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
2920
2920
  }
2921
2921
  }
2922
2922
 
2923
+ const COMPONENTS = "components";
2924
+ const DIRECTIVES = "directives";
2925
+ const FILTERS = "filters";
2926
+ function resolveComponent(name, maybeSelfReference) {
2927
+ return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
2928
+ }
2929
+ const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
2930
+ function resolveDynamicComponent(component) {
2931
+ if (isString(component)) {
2932
+ return resolveAsset(COMPONENTS, component, false) || component;
2933
+ } else {
2934
+ return component || NULL_DYNAMIC_COMPONENT;
2935
+ }
2936
+ }
2937
+ function resolveDirective(name) {
2938
+ return resolveAsset(DIRECTIVES, name);
2939
+ }
2940
+ function resolveFilter$1(name) {
2941
+ return resolveAsset(FILTERS, name);
2942
+ }
2943
+ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
2944
+ const instance = currentRenderingInstance || currentInstance;
2945
+ if (instance) {
2946
+ const Component = instance.type;
2947
+ if (type === COMPONENTS) {
2948
+ const selfName = getComponentName(
2949
+ Component,
2950
+ false
2951
+ /* do not include inferred name to avoid breaking existing code */
2952
+ );
2953
+ if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
2954
+ return Component;
2955
+ }
2956
+ }
2957
+ const res = (
2958
+ // local registration
2959
+ // check instance[type] first which is resolved for options API
2960
+ resolve(instance[type] || Component[type], name) || // global registration
2961
+ resolve(instance.appContext[type], name)
2962
+ );
2963
+ if (!res && maybeSelfReference) {
2964
+ return Component;
2965
+ }
2966
+ if (warnMissing && !res) {
2967
+ const extra = type === COMPONENTS ? `
2968
+ If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
2969
+ warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
2970
+ }
2971
+ return res;
2972
+ } else {
2973
+ warn(
2974
+ `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
2975
+ );
2976
+ }
2977
+ }
2978
+ function resolve(registry, name) {
2979
+ return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
2980
+ }
2981
+
2923
2982
  const isSuspense = (type) => type.__isSuspense;
2924
2983
  const SuspenseImpl = {
2925
2984
  name: "Suspense",
@@ -3454,7 +3513,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3454
3513
  }
3455
3514
  if (isArray(s)) {
3456
3515
  const singleChild = filterSingleRoot(s);
3457
- if (!singleChild) {
3516
+ if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
3458
3517
  warn(`<Suspense> slots expect a single root node.`);
3459
3518
  }
3460
3519
  s = singleChild;
@@ -4631,65 +4690,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4631
4690
  return listeners;
4632
4691
  }
4633
4692
 
4634
- const COMPONENTS = "components";
4635
- const DIRECTIVES = "directives";
4636
- const FILTERS = "filters";
4637
- function resolveComponent(name, maybeSelfReference) {
4638
- return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
4639
- }
4640
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
4641
- function resolveDynamicComponent(component) {
4642
- if (isString(component)) {
4643
- return resolveAsset(COMPONENTS, component, false) || component;
4644
- } else {
4645
- return component || NULL_DYNAMIC_COMPONENT;
4646
- }
4647
- }
4648
- function resolveDirective(name) {
4649
- return resolveAsset(DIRECTIVES, name);
4650
- }
4651
- function resolveFilter$1(name) {
4652
- return resolveAsset(FILTERS, name);
4653
- }
4654
- function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
4655
- const instance = currentRenderingInstance || currentInstance;
4656
- if (instance) {
4657
- const Component = instance.type;
4658
- if (type === COMPONENTS) {
4659
- const selfName = getComponentName(
4660
- Component,
4661
- false
4662
- /* do not include inferred name to avoid breaking existing code */
4663
- );
4664
- if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
4665
- return Component;
4666
- }
4667
- }
4668
- const res = (
4669
- // local registration
4670
- // check instance[type] first which is resolved for options API
4671
- resolve(instance[type] || Component[type], name) || // global registration
4672
- resolve(instance.appContext[type], name)
4673
- );
4674
- if (!res && maybeSelfReference) {
4675
- return Component;
4676
- }
4677
- if (warnMissing && !res) {
4678
- const extra = type === COMPONENTS ? `
4679
- If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
4680
- warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
4681
- }
4682
- return res;
4683
- } else {
4684
- warn(
4685
- `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
4686
- );
4687
- }
4688
- }
4689
- function resolve(registry, name) {
4690
- return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
4691
- }
4692
-
4693
4693
  function convertLegacyRenderFn(instance) {
4694
4694
  const Component2 = instance.type;
4695
4695
  const render = Component2.render;
@@ -6192,7 +6192,7 @@ If this is a native custom element, make sure to exclude it from component resol
6192
6192
  return vm;
6193
6193
  }
6194
6194
  }
6195
- Vue.version = `2.6.14-compat:${"3.3.7"}`;
6195
+ Vue.version = `2.6.14-compat:${"3.3.8"}`;
6196
6196
  Vue.config = singletonApp.config;
6197
6197
  Vue.use = (p, ...options) => {
6198
6198
  if (p && isFunction(p.install)) {
@@ -7521,15 +7521,15 @@ If you want to remount the same app, move your app creation logic into a factory
7521
7521
  }
7522
7522
  break;
7523
7523
  case Comment:
7524
- if (domType !== 8 /* COMMENT */ || isFragmentStart) {
7525
- if (node.tagName.toLowerCase() === "template") {
7526
- const content = vnode.el.content.firstChild;
7527
- replaceNode(content, node, parentComponent);
7528
- vnode.el = node = content;
7529
- nextNode = nextSibling(node);
7530
- } else {
7531
- nextNode = onMismatch();
7532
- }
7524
+ if (isTemplateNode(node)) {
7525
+ nextNode = nextSibling(node);
7526
+ replaceNode(
7527
+ vnode.el = node.content.firstChild,
7528
+ node,
7529
+ parentComponent
7530
+ );
7531
+ } else if (domType !== 8 /* COMMENT */ || isFragmentStart) {
7532
+ nextNode = onMismatch();
7533
7533
  } else {
7534
7534
  nextNode = nextSibling(node);
7535
7535
  }
@@ -7873,8 +7873,7 @@ If you want to remount the same app, move your app creation logic into a factory
7873
7873
  let parent = parentComponent;
7874
7874
  while (parent) {
7875
7875
  if (parent.vnode.el === oldNode) {
7876
- parent.vnode.el = newNode;
7877
- parent.subTree.el = newNode;
7876
+ parent.vnode.el = parent.subTree.el = newNode;
7878
7877
  }
7879
7878
  parent = parent.parent;
7880
7879
  }
@@ -10761,7 +10760,7 @@ Component that was made reactive: `,
10761
10760
  return true;
10762
10761
  }
10763
10762
 
10764
- const version = "3.3.7";
10763
+ const version = "3.3.8";
10765
10764
  const ssrUtils = null;
10766
10765
  const resolveFilter = resolveFilter$1 ;
10767
10766
  const _compatUtils = {