@vue/compiler-ssr 3.2.45 → 3.2.47

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.
@@ -210,7 +210,7 @@ function ssrProcessTeleport(node, context) {
210
210
  ]));
211
211
  }
212
212
 
213
- const wipMap = new WeakMap();
213
+ const wipMap$2 = new WeakMap();
214
214
  // phase 1
215
215
  function ssrTransformSuspense(node, context) {
216
216
  return () => {
@@ -219,7 +219,7 @@ function ssrTransformSuspense(node, context) {
219
219
  slotsExp: null,
220
220
  wipSlots: []
221
221
  };
222
- wipMap.set(node, wipEntry);
222
+ wipMap$2.set(node, wipEntry);
223
223
  wipEntry.slotsExp = compilerDom.buildSlots(node, context, (_props, children, loc) => {
224
224
  const fn = compilerDom.createFunctionExpression([], undefined, // no return, assign body later
225
225
  true, // newline
@@ -237,7 +237,7 @@ function ssrTransformSuspense(node, context) {
237
237
  // phase 2
238
238
  function ssrProcessSuspense(node, context) {
239
239
  // complete wip slots with ssr code
240
- const wipEntry = wipMap.get(node);
240
+ const wipEntry = wipMap$2.get(node);
241
241
  if (!wipEntry) {
242
242
  return;
243
243
  }
@@ -593,7 +593,7 @@ function ssrProcessTransitionGroup(node, context) {
593
593
  // scope tracking, but the children of each slot cannot be processed until
594
594
  // the 2nd pass, so we store the WIP slot functions in a weakMap during the 1st
595
595
  // pass and complete them in the 2nd pass.
596
- const wipMap$2 = new WeakMap();
596
+ const wipMap = new WeakMap();
597
597
  const WIP_SLOT = Symbol();
598
598
  const componentTypeMap = new WeakMap();
599
599
  // ssr component transform is done in two phases:
@@ -647,7 +647,7 @@ const ssrTransformComponent = (node, context) => {
647
647
  }
648
648
  }
649
649
  const wipEntries = [];
650
- wipMap$2.set(node, wipEntries);
650
+ wipMap.set(node, wipEntries);
651
651
  const buildSSRSlotFn = (props, children, loc) => {
652
652
  const param0 = (props && compilerDom.stringifyExpression(props)) || `_`;
653
653
  const fn = compilerDom.createFunctionExpression([param0, `_push`, `_parent`, `_scopeId`], undefined, // no return, assign body later
@@ -716,7 +716,7 @@ function ssrProcessComponent(node, context, parent) {
716
716
  }
717
717
  else {
718
718
  // finish up slot function expressions from the 1st pass.
719
- const wipEntries = wipMap$2.get(node) || [];
719
+ const wipEntries = wipMap.get(node) || [];
720
720
  for (let i = 0; i < wipEntries.length; i++) {
721
721
  const { fn, vnodeBranch } = wipEntries[i];
722
722
  // For each slot, we generate two branches: one SSR-optimized branch and
@@ -852,8 +852,7 @@ function ssrCodegenTransform(ast, options) {
852
852
  const varsExp = compilerDom.processExpression(compilerDom.createSimpleExpression(options.ssrCssVars, false), cssContext);
853
853
  context.body.push(compilerDom.createCompoundExpression([`const _cssVars = { style: `, varsExp, `}`]));
854
854
  Array.from(cssContext.helpers.keys()).forEach(helper => {
855
- if (!ast.helpers.includes(helper))
856
- ast.helpers.push(helper);
855
+ ast.helpers.add(helper);
857
856
  });
858
857
  }
859
858
  const isFragment = ast.children.length > 1 && ast.children.some(c => !compilerDom.isText(c));
@@ -861,8 +860,11 @@ function ssrCodegenTransform(ast, options) {
861
860
  ast.codegenNode = compilerDom.createBlockStatement(context.body);
862
861
  // Finalize helpers.
863
862
  // We need to separate helpers imported from 'vue' vs. '@vue/server-renderer'
864
- ast.ssrHelpers = Array.from(new Set([...ast.helpers.filter(h => h in ssrHelpers), ...context.helpers]));
865
- ast.helpers = ast.helpers.filter(h => !(h in ssrHelpers));
863
+ ast.ssrHelpers = Array.from(new Set([
864
+ ...Array.from(ast.helpers).filter(h => h in ssrHelpers),
865
+ ...context.helpers
866
+ ]));
867
+ ast.helpers = new Set(Array.from(ast.helpers).filter(h => !(h in ssrHelpers)));
866
868
  }
867
869
  function createSSRTransformContext(root, options, helpers = new Set(), withSlotScopeId = false) {
868
870
  const body = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-ssr",
3
- "version": "3.2.45",
3
+ "version": "3.2.47",
4
4
  "description": "@vue/compiler-ssr",
5
5
  "main": "dist/compiler-ssr.cjs.js",
6
6
  "types": "dist/compiler-ssr.d.ts",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-ssr#readme",
30
30
  "dependencies": {
31
- "@vue/shared": "3.2.45",
32
- "@vue/compiler-dom": "3.2.45"
31
+ "@vue/shared": "3.2.47",
32
+ "@vue/compiler-dom": "3.2.47"
33
33
  }
34
34
  }