@vue/compiler-sfc 3.5.6 → 3.5.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compiler-sfc v3.5.6
2
+ * @vue/compiler-sfc v3.5.8
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -19767,7 +19767,7 @@ function transformDestructuredProps(ctx, vueImportAliases) {
19767
19767
  if (ctx.options.propsDestructure === false) {
19768
19768
  return;
19769
19769
  }
19770
- const rootScope = {};
19770
+ const rootScope = /* @__PURE__ */ Object.create(null);
19771
19771
  const scopeStack = [rootScope];
19772
19772
  let currentScope = rootScope;
19773
19773
  const excludedIds = /* @__PURE__ */ new WeakSet();
@@ -20906,7 +20906,7 @@ function isStaticNode(node) {
20906
20906
  return false;
20907
20907
  }
20908
20908
 
20909
- const version = "3.5.6";
20909
+ const version = "3.5.8";
20910
20910
  const parseCache = parseCache$1;
20911
20911
  const errorMessages = {
20912
20912
  ...CompilerDOM.errorMessages,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compiler-sfc v3.5.6
2
+ * @vue/compiler-sfc v3.5.8
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -24170,7 +24170,7 @@ const transformModel$1 = (dir, node, context) => {
24170
24170
  );
24171
24171
  return createTransformProps();
24172
24172
  }
24173
- const rawExp = exp.loc.source;
24173
+ const rawExp = exp.loc.source.trim();
24174
24174
  const expString = exp.type === 4 ? exp.content : rawExp;
24175
24175
  const bindingType = context.bindingMetadata[rawExp];
24176
24176
  if (bindingType === "props" || bindingType === "props-aliased") {
@@ -30675,7 +30675,7 @@ const ssrTransformIf = createStructuralDirectiveTransform(
30675
30675
  /^(if|else|else-if)$/,
30676
30676
  processIf
30677
30677
  );
30678
- function ssrProcessIf(node, context, disableNestedFragments = false, disableCommentAsIfAlternate = false) {
30678
+ function ssrProcessIf(node, context, disableNestedFragments = false, disableComment = false) {
30679
30679
  const [rootBranch] = node.branches;
30680
30680
  const ifStatement = createIfStatement(
30681
30681
  rootBranch.condition,
@@ -30699,7 +30699,7 @@ function ssrProcessIf(node, context, disableNestedFragments = false, disableComm
30699
30699
  currentIf.alternate = branchBlockStatement;
30700
30700
  }
30701
30701
  }
30702
- if (!currentIf.alternate && !disableCommentAsIfAlternate) {
30702
+ if (!currentIf.alternate && !disableComment) {
30703
30703
  currentIf.alternate = createBlockStatement([
30704
30704
  createCallExpression(`_push`, ["`<!---->`"])
30705
30705
  ]);
@@ -31616,7 +31616,7 @@ function createChildContext(parent, withSlotScopeId = parent.withSlotScopeId) {
31616
31616
  withSlotScopeId
31617
31617
  );
31618
31618
  }
31619
- function processChildren(parent, context, asFragment = false, disableNestedFragments = false, disableCommentAsIfAlternate = false) {
31619
+ function processChildren(parent, context, asFragment = false, disableNestedFragments = false, disableComment = false) {
31620
31620
  if (asFragment) {
31621
31621
  context.pushStringPart(`<!--[-->`);
31622
31622
  }
@@ -31652,7 +31652,9 @@ function processChildren(parent, context, asFragment = false, disableNestedFragm
31652
31652
  context.pushStringPart(escapeHtml(child.content));
31653
31653
  break;
31654
31654
  case 3:
31655
- context.pushStringPart(`<!--${child.content}-->`);
31655
+ if (!disableComment) {
31656
+ context.pushStringPart(`<!--${child.content}-->`);
31657
+ }
31656
31658
  break;
31657
31659
  case 5:
31658
31660
  context.pushStringPart(
@@ -31662,12 +31664,7 @@ function processChildren(parent, context, asFragment = false, disableNestedFragm
31662
31664
  );
31663
31665
  break;
31664
31666
  case 9:
31665
- ssrProcessIf(
31666
- child,
31667
- context,
31668
- disableNestedFragments,
31669
- disableCommentAsIfAlternate
31670
- );
31667
+ ssrProcessIf(child, context, disableNestedFragments, disableComment);
31671
31668
  break;
31672
31669
  case 11:
31673
31670
  ssrProcessFor(child, context, disableNestedFragments);
@@ -50726,7 +50723,7 @@ function transformDestructuredProps(ctx, vueImportAliases) {
50726
50723
  if (ctx.options.propsDestructure === false) {
50727
50724
  return;
50728
50725
  }
50729
- const rootScope = {};
50726
+ const rootScope = /* @__PURE__ */ Object.create(null);
50730
50727
  const scopeStack = [rootScope];
50731
50728
  let currentScope = rootScope;
50732
50729
  const excludedIds = /* @__PURE__ */ new WeakSet();
@@ -51895,7 +51892,7 @@ var __spreadValues = (a, b) => {
51895
51892
  }
51896
51893
  return a;
51897
51894
  };
51898
- const version = "3.5.6";
51895
+ const version = "3.5.8";
51899
51896
  const parseCache = parseCache$1;
51900
51897
  const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages);
51901
51898
  const walk = walk$2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-sfc",
3
- "version": "3.5.6",
3
+ "version": "3.5.8",
4
4
  "description": "@vue/compiler-sfc",
5
5
  "main": "dist/compiler-sfc.cjs.js",
6
6
  "module": "dist/compiler-sfc.esm-browser.js",
@@ -47,10 +47,10 @@
47
47
  "magic-string": "^0.30.11",
48
48
  "postcss": "^8.4.47",
49
49
  "source-map-js": "^1.2.0",
50
- "@vue/compiler-core": "3.5.6",
51
- "@vue/compiler-ssr": "3.5.6",
52
- "@vue/compiler-dom": "3.5.6",
53
- "@vue/shared": "3.5.6"
50
+ "@vue/compiler-core": "3.5.8",
51
+ "@vue/compiler-ssr": "3.5.8",
52
+ "@vue/compiler-dom": "3.5.8",
53
+ "@vue/shared": "3.5.8"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@babel/types": "^7.25.2",