@vue/server-renderer 3.2.26 → 3.2.27

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.
@@ -197,7 +197,7 @@ function renderComponentVNode(vnode, parentComponent = null, slotScopeId) {
197
197
  const instance = createComponentInstance(vnode, parentComponent, null);
198
198
  const res = setupComponent(instance, true /* isSSR */);
199
199
  const hasAsyncSetup = shared.isPromise(res);
200
- const prefetches = instance.sp;
200
+ const prefetches = instance.sp; /* LifecycleHooks.SERVER_PREFETCH */
201
201
  if (hasAsyncSetup || prefetches) {
202
202
  let p = hasAsyncSetup
203
203
  ? res
@@ -682,38 +682,6 @@ function isRef(r) {
682
682
  return Boolean(r && r.__v_isRef === true);
683
683
  }
684
684
 
685
- const classifyRE = /(?:^|[-_])(\w)/g;
686
- const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
687
- function getComponentName(Component) {
688
- return shared.isFunction(Component)
689
- ? Component.displayName || Component.name
690
- : Component.name;
691
- }
692
- /* istanbul ignore next */
693
- function formatComponentName(instance, Component, isRoot = false) {
694
- let name = getComponentName(Component);
695
- if (!name && Component.__file) {
696
- const match = Component.__file.match(/([^/\\]+)\.\w+$/);
697
- if (match) {
698
- name = match[1];
699
- }
700
- }
701
- if (!name && instance && instance.parent) {
702
- // try to infer the name based on reverse resolution
703
- const inferFromRegistry = (registry) => {
704
- for (const key in registry) {
705
- if (registry[key] === Component) {
706
- return key;
707
- }
708
- }
709
- };
710
- name =
711
- inferFromRegistry(instance.components ||
712
- instance.parent.type.components) || inferFromRegistry(instance.appContext.components);
713
- }
714
- return name ? classify(name) : isRoot ? `App` : `Anonymous`;
715
- }
716
-
717
685
  const stack = [];
718
686
  function pushWarningContext(vnode) {
719
687
  stack.push(vnode);
@@ -914,6 +882,38 @@ function logError(err, type, contextVNode, throwInDev = true) {
914
882
  }
915
883
  }
916
884
 
885
+ const classifyRE = /(?:^|[-_])(\w)/g;
886
+ const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
887
+ function getComponentName(Component) {
888
+ return shared.isFunction(Component)
889
+ ? Component.displayName || Component.name
890
+ : Component.name;
891
+ }
892
+ /* istanbul ignore next */
893
+ function formatComponentName(instance, Component, isRoot = false) {
894
+ let name = getComponentName(Component);
895
+ if (!name && Component.__file) {
896
+ const match = Component.__file.match(/([^/\\]+)\.\w+$/);
897
+ if (match) {
898
+ name = match[1];
899
+ }
900
+ }
901
+ if (!name && instance && instance.parent) {
902
+ // try to infer the name based on reverse resolution
903
+ const inferFromRegistry = (registry) => {
904
+ for (const key in registry) {
905
+ if (registry[key] === Component) {
906
+ return key;
907
+ }
908
+ }
909
+ };
910
+ name =
911
+ inferFromRegistry(instance.components ||
912
+ instance.parent.type.components) || inferFromRegistry(instance.appContext.components);
913
+ }
914
+ return name ? classify(name) : isRoot ? `App` : `Anonymous`;
915
+ }
916
+
917
917
  function ssrRenderList(source, renderItem) {
918
918
  if (shared.isArray(source) || shared.isString(source)) {
919
919
  for (let i = 0, l = source.length; i < l; i++) {
@@ -194,7 +194,7 @@ function renderComponentVNode(vnode, parentComponent = null, slotScopeId) {
194
194
  const instance = createComponentInstance(vnode, parentComponent, null);
195
195
  const res = setupComponent(instance, true /* isSSR */);
196
196
  const hasAsyncSetup = shared.isPromise(res);
197
- const prefetches = instance.sp;
197
+ const prefetches = instance.sp; /* LifecycleHooks.SERVER_PREFETCH */
198
198
  if (hasAsyncSetup || prefetches) {
199
199
  let p = hasAsyncSetup
200
200
  ? res
@@ -166,7 +166,7 @@ function renderComponentVNode(vnode, parentComponent = null, slotScopeId) {
166
166
  const instance = createComponentInstance(vnode, parentComponent, null);
167
167
  const res = setupComponent(instance, true /* isSSR */);
168
168
  const hasAsyncSetup = isPromise(res);
169
- const prefetches = instance.sp;
169
+ const prefetches = instance.sp; /* LifecycleHooks.SERVER_PREFETCH */
170
170
  if (hasAsyncSetup || prefetches) {
171
171
  let p = hasAsyncSetup
172
172
  ? res
@@ -649,38 +649,6 @@ function isRef(r) {
649
649
  return Boolean(r && r.__v_isRef === true);
650
650
  }
651
651
 
652
- const classifyRE = /(?:^|[-_])(\w)/g;
653
- const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
654
- function getComponentName(Component) {
655
- return isFunction(Component)
656
- ? Component.displayName || Component.name
657
- : Component.name;
658
- }
659
- /* istanbul ignore next */
660
- function formatComponentName(instance, Component, isRoot = false) {
661
- let name = getComponentName(Component);
662
- if (!name && Component.__file) {
663
- const match = Component.__file.match(/([^/\\]+)\.\w+$/);
664
- if (match) {
665
- name = match[1];
666
- }
667
- }
668
- if (!name && instance && instance.parent) {
669
- // try to infer the name based on reverse resolution
670
- const inferFromRegistry = (registry) => {
671
- for (const key in registry) {
672
- if (registry[key] === Component) {
673
- return key;
674
- }
675
- }
676
- };
677
- name =
678
- inferFromRegistry(instance.components ||
679
- instance.parent.type.components) || inferFromRegistry(instance.appContext.components);
680
- }
681
- return name ? classify(name) : isRoot ? `App` : `Anonymous`;
682
- }
683
-
684
652
  const stack = [];
685
653
  function pushWarningContext(vnode) {
686
654
  stack.push(vnode);
@@ -885,6 +853,38 @@ function logError(err, type, contextVNode, throwInDev = true) {
885
853
  }
886
854
  }
887
855
 
856
+ const classifyRE = /(?:^|[-_])(\w)/g;
857
+ const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
858
+ function getComponentName(Component) {
859
+ return isFunction(Component)
860
+ ? Component.displayName || Component.name
861
+ : Component.name;
862
+ }
863
+ /* istanbul ignore next */
864
+ function formatComponentName(instance, Component, isRoot = false) {
865
+ let name = getComponentName(Component);
866
+ if (!name && Component.__file) {
867
+ const match = Component.__file.match(/([^/\\]+)\.\w+$/);
868
+ if (match) {
869
+ name = match[1];
870
+ }
871
+ }
872
+ if (!name && instance && instance.parent) {
873
+ // try to infer the name based on reverse resolution
874
+ const inferFromRegistry = (registry) => {
875
+ for (const key in registry) {
876
+ if (registry[key] === Component) {
877
+ return key;
878
+ }
879
+ }
880
+ };
881
+ name =
882
+ inferFromRegistry(instance.components ||
883
+ instance.parent.type.components) || inferFromRegistry(instance.appContext.components);
884
+ }
885
+ return name ? classify(name) : isRoot ? `App` : `Anonymous`;
886
+ }
887
+
888
888
  function ssrRenderList(source, renderItem) {
889
889
  if (isArray(source) || isString(source)) {
890
890
  for (let i = 0, l = source.length; i < l; i++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/server-renderer",
3
- "version": "3.2.26",
3
+ "version": "3.2.27",
4
4
  "description": "@vue/server-renderer",
5
5
  "main": "index.js",
6
6
  "module": "dist/server-renderer.esm-bundler.js",
@@ -31,10 +31,10 @@
31
31
  },
32
32
  "homepage": "https://github.com/vuejs/vue-next/tree/master/packages/server-renderer#readme",
33
33
  "peerDependencies": {
34
- "vue": "3.2.26"
34
+ "vue": "3.2.27"
35
35
  },
36
36
  "dependencies": {
37
- "@vue/shared": "3.2.26",
38
- "@vue/compiler-ssr": "3.2.26"
37
+ "@vue/shared": "3.2.27",
38
+ "@vue/compiler-ssr": "3.2.27"
39
39
  }
40
40
  }