@vue/compiler-core 3.5.22 → 3.5.23

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-core v3.5.22
2
+ * @vue/compiler-core v3.5.23
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -4595,14 +4595,17 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
4595
4595
  knownIds
4596
4596
  );
4597
4597
  const children = [];
4598
+ const isTSNode = TS_NODE_TYPES.includes(ast.type);
4598
4599
  ids.sort((a, b) => a.start - b.start);
4599
4600
  ids.forEach((id, i) => {
4600
4601
  const start = id.start - 1;
4601
4602
  const end = id.end - 1;
4602
4603
  const last = ids[i - 1];
4603
- const leadingText = rawExp.slice(last ? last.end - 1 : 0, start);
4604
- if (leadingText.length || id.prefix) {
4605
- children.push(leadingText + (id.prefix || ``));
4604
+ if (!(isTSNode && i === 0)) {
4605
+ const leadingText = rawExp.slice(last ? last.end - 1 : 0, start);
4606
+ if (leadingText.length || id.prefix) {
4607
+ children.push(leadingText + (id.prefix || ``));
4608
+ }
4606
4609
  }
4607
4610
  const source = rawExp.slice(start, end);
4608
4611
  children.push(
@@ -4617,7 +4620,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
4617
4620
  id.isConstant ? 3 : 0
4618
4621
  )
4619
4622
  );
4620
- if (i === ids.length - 1 && end < rawExp.length) {
4623
+ if (i === ids.length - 1 && end < rawExp.length && !isTSNode) {
4621
4624
  children.push(rawExp.slice(end));
4622
4625
  }
4623
4626
  });
@@ -6617,7 +6620,8 @@ const transformMemo = (node, context) => {
6617
6620
  const transformVBindShorthand = (node, context) => {
6618
6621
  if (node.type === 1) {
6619
6622
  for (const prop of node.props) {
6620
- if (prop.type === 7 && prop.name === "bind" && !prop.exp) {
6623
+ if (prop.type === 7 && prop.name === "bind" && (!prop.exp || // #13930 :foo in in-DOM templates will be parsed into :foo="" by browser
6624
+ false) && prop.arg) {
6621
6625
  const arg = prop.arg;
6622
6626
  if (arg.type !== 4 || !arg.isStatic) {
6623
6627
  context.onError(
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compiler-core v3.5.22
2
+ * @vue/compiler-core v3.5.23
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -4519,14 +4519,17 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
4519
4519
  knownIds
4520
4520
  );
4521
4521
  const children = [];
4522
+ const isTSNode = TS_NODE_TYPES.includes(ast.type);
4522
4523
  ids.sort((a, b) => a.start - b.start);
4523
4524
  ids.forEach((id, i) => {
4524
4525
  const start = id.start - 1;
4525
4526
  const end = id.end - 1;
4526
4527
  const last = ids[i - 1];
4527
- const leadingText = rawExp.slice(last ? last.end - 1 : 0, start);
4528
- if (leadingText.length || id.prefix) {
4529
- children.push(leadingText + (id.prefix || ``));
4528
+ if (!(isTSNode && i === 0)) {
4529
+ const leadingText = rawExp.slice(last ? last.end - 1 : 0, start);
4530
+ if (leadingText.length || id.prefix) {
4531
+ children.push(leadingText + (id.prefix || ``));
4532
+ }
4530
4533
  }
4531
4534
  const source = rawExp.slice(start, end);
4532
4535
  children.push(
@@ -4541,7 +4544,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
4541
4544
  id.isConstant ? 3 : 0
4542
4545
  )
4543
4546
  );
4544
- if (i === ids.length - 1 && end < rawExp.length) {
4547
+ if (i === ids.length - 1 && end < rawExp.length && !isTSNode) {
4545
4548
  children.push(rawExp.slice(end));
4546
4549
  }
4547
4550
  });
@@ -6494,7 +6497,8 @@ const transformMemo = (node, context) => {
6494
6497
  const transformVBindShorthand = (node, context) => {
6495
6498
  if (node.type === 1) {
6496
6499
  for (const prop of node.props) {
6497
- if (prop.type === 7 && prop.name === "bind" && !prop.exp) {
6500
+ if (prop.type === 7 && prop.name === "bind" && (!prop.exp || // #13930 :foo in in-DOM templates will be parsed into :foo="" by browser
6501
+ false) && prop.arg) {
6498
6502
  const arg = prop.arg;
6499
6503
  if (arg.type !== 4 || !arg.isStatic) {
6500
6504
  context.onError(
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compiler-core v3.5.22
2
+ * @vue/compiler-core v3.5.23
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -5711,7 +5711,8 @@ const transformMemo = (node, context) => {
5711
5711
  const transformVBindShorthand = (node, context) => {
5712
5712
  if (node.type === 1) {
5713
5713
  for (const prop of node.props) {
5714
- if (prop.type === 7 && prop.name === "bind" && !prop.exp) {
5714
+ if (prop.type === 7 && prop.name === "bind" && (!prop.exp || // #13930 :foo in in-DOM templates will be parsed into :foo="" by browser
5715
+ prop.exp.type === 4 && !prop.exp.content.trim()) && prop.arg) {
5715
5716
  const arg = prop.arg;
5716
5717
  if (arg.type !== 4 || !arg.isStatic) {
5717
5718
  context.onError(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-core",
3
- "version": "3.5.22",
3
+ "version": "3.5.23",
4
4
  "description": "@vue/compiler-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/compiler-core.esm-bundler.js",
@@ -46,13 +46,13 @@
46
46
  },
47
47
  "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
48
48
  "dependencies": {
49
- "@babel/parser": "^7.28.4",
49
+ "@babel/parser": "^7.28.5",
50
50
  "entities": "^4.5.0",
51
51
  "estree-walker": "^2.0.2",
52
52
  "source-map-js": "^1.2.1",
53
- "@vue/shared": "3.5.22"
53
+ "@vue/shared": "3.5.23"
54
54
  },
55
55
  "devDependencies": {
56
- "@babel/types": "^7.28.4"
56
+ "@babel/types": "^7.28.5"
57
57
  }
58
58
  }