@vue/compiler-sfc 3.4.28 → 3.4.30

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.4.28
2
+ * @vue/compiler-sfc v3.4.30
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -15708,12 +15708,12 @@ function resolveParserPlugins(lang, userPlugins, dts = false) {
15708
15708
  )) {
15709
15709
  plugins.push("importAttributes");
15710
15710
  }
15711
- if (lang === "jsx" || lang === "tsx") {
15711
+ if (lang === "jsx" || lang === "tsx" || lang === "mtsx") {
15712
15712
  plugins.push("jsx");
15713
15713
  } else if (userPlugins) {
15714
15714
  userPlugins = userPlugins.filter((p) => p !== "jsx");
15715
15715
  }
15716
- if (lang === "ts" || lang === "tsx") {
15716
+ if (lang === "ts" || lang === "mts" || lang === "tsx" || lang === "mtsx") {
15717
15717
  plugins.push(["typescript", { dts }], "explicitResourceManagement");
15718
15718
  if (!userPlugins || !userPlugins.includes("decorators")) {
15719
15719
  plugins.push("decorators-legacy");
@@ -17931,6 +17931,9 @@ function resolveTypeElements(ctx, node, scope, typeParameters) {
17931
17931
  }
17932
17932
  function innerResolveTypeElements(ctx, node, scope, typeParameters) {
17933
17933
  var _a, _b;
17934
+ if (node.leadingComments && node.leadingComments.some((c) => c.value.includes("@vue-ignore"))) {
17935
+ return { props: {} };
17936
+ }
17934
17937
  switch (node.type) {
17935
17938
  case "TSTypeLiteral":
17936
17939
  return typeElementsToMap(ctx, node.members, scope, typeParameters);
@@ -18141,9 +18144,6 @@ function resolveInterfaceMembers(ctx, node, scope, typeParameters) {
18141
18144
  );
18142
18145
  if (node.extends) {
18143
18146
  for (const ext of node.extends) {
18144
- if (ext.leadingComments && ext.leadingComments.some((c) => c.value.includes("@vue-ignore"))) {
18145
- continue;
18146
- }
18147
18147
  try {
18148
18148
  const { props, calls } = resolveTypeElements(ctx, ext, scope);
18149
18149
  for (const key in props) {
@@ -18163,7 +18163,8 @@ If this previously worked in 3.2, you can instruct the compiler to ignore this e
18163
18163
  interface Props extends /* @vue-ignore */ Base {}
18164
18164
 
18165
18165
  Note: both in 3.2 or with the ignore, the properties in the base type are treated as fallthrough attrs at runtime.`,
18166
- ext
18166
+ ext,
18167
+ scope
18167
18168
  );
18168
18169
  }
18169
18170
  }
@@ -18671,12 +18672,12 @@ function fileToScope(ctx, filename, asGlobal = false) {
18671
18672
  }
18672
18673
  function parseFile(filename, content, parserPlugins) {
18673
18674
  const ext = path$3.extname(filename);
18674
- if (ext === ".ts" || ext === ".tsx") {
18675
+ if (ext === ".ts" || ext === ".mts" || ext === ".tsx" || ext === ".mtsx") {
18675
18676
  return parser$1.parse(content, {
18676
18677
  plugins: resolveParserPlugins(
18677
18678
  ext.slice(1),
18678
18679
  parserPlugins,
18679
- filename.endsWith(".d.ts")
18680
+ /\.d\.m?ts$/.test(filename)
18680
18681
  ),
18681
18682
  sourceType: "module"
18682
18683
  }).program.body;
@@ -20848,7 +20849,7 @@ function isStaticNode(node) {
20848
20849
  return false;
20849
20850
  }
20850
20851
 
20851
- const version = "3.4.28";
20852
+ const version = "3.4.30";
20852
20853
  const parseCache = parseCache$1;
20853
20854
  const errorMessages = {
20854
20855
  ...CompilerDOM.errorMessages,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compiler-sfc v3.4.28
2
+ * @vue/compiler-sfc v3.4.30
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -23378,9 +23378,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
23378
23378
  break;
23379
23379
  }
23380
23380
  }
23381
- if (prev && isTemplateNode(prev) && findDir(prev, "if")) {
23382
- children.splice(i, 1);
23383
- i--;
23381
+ if (prev && isTemplateNode(prev) && findDir(prev, /^(else-)?if$/)) {
23384
23382
  let conditional = dynamicSlots[dynamicSlots.length - 1];
23385
23383
  while (conditional.alternate.type === 19) {
23386
23384
  conditional = conditional.alternate;
@@ -45357,12 +45355,12 @@ function resolveParserPlugins(lang, userPlugins, dts = false) {
45357
45355
  )) {
45358
45356
  plugins.push("importAttributes");
45359
45357
  }
45360
- if (lang === "jsx" || lang === "tsx") {
45358
+ if (lang === "jsx" || lang === "tsx" || lang === "mtsx") {
45361
45359
  plugins.push("jsx");
45362
45360
  } else if (userPlugins) {
45363
45361
  userPlugins = userPlugins.filter((p) => p !== "jsx");
45364
45362
  }
45365
- if (lang === "ts" || lang === "tsx") {
45363
+ if (lang === "ts" || lang === "mts" || lang === "tsx" || lang === "mtsx") {
45366
45364
  plugins.push(["typescript", { dts }], "explicitResourceManagement");
45367
45365
  if (!userPlugins || !userPlugins.includes("decorators")) {
45368
45366
  plugins.push("decorators-legacy");
@@ -45577,6 +45575,9 @@ function resolveTypeElements(ctx, node, scope, typeParameters) {
45577
45575
  }
45578
45576
  function innerResolveTypeElements(ctx, node, scope, typeParameters) {
45579
45577
  var _a, _b;
45578
+ if (node.leadingComments && node.leadingComments.some((c) => c.value.includes("@vue-ignore"))) {
45579
+ return { props: {} };
45580
+ }
45580
45581
  switch (node.type) {
45581
45582
  case "TSTypeLiteral":
45582
45583
  return typeElementsToMap(ctx, node.members, scope, typeParameters);
@@ -45787,9 +45788,6 @@ function resolveInterfaceMembers(ctx, node, scope, typeParameters) {
45787
45788
  );
45788
45789
  if (node.extends) {
45789
45790
  for (const ext of node.extends) {
45790
- if (ext.leadingComments && ext.leadingComments.some((c) => c.value.includes("@vue-ignore"))) {
45791
- continue;
45792
- }
45793
45791
  try {
45794
45792
  const { props, calls } = resolveTypeElements(ctx, ext, scope);
45795
45793
  for (const key in props) {
@@ -45809,7 +45807,8 @@ If this previously worked in 3.2, you can instruct the compiler to ignore this e
45809
45807
  interface Props extends /* @vue-ignore */ Base {}
45810
45808
 
45811
45809
  Note: both in 3.2 or with the ignore, the properties in the base type are treated as fallthrough attrs at runtime.`,
45812
- ext
45810
+ ext,
45811
+ scope
45813
45812
  );
45814
45813
  }
45815
45814
  }
@@ -46229,12 +46228,12 @@ function fileToScope(ctx, filename, asGlobal = false) {
46229
46228
  }
46230
46229
  function parseFile(filename, content, parserPlugins) {
46231
46230
  const ext = extname(filename);
46232
- if (ext === ".ts" || ext === ".tsx") {
46231
+ if (ext === ".ts" || ext === ".mts" || ext === ".tsx" || ext === ".mtsx") {
46233
46232
  return parse_1$1(content, {
46234
46233
  plugins: resolveParserPlugins(
46235
46234
  ext.slice(1),
46236
46235
  parserPlugins,
46237
- filename.endsWith(".d.ts")
46236
+ /\.d\.m?ts$/.test(filename)
46238
46237
  ),
46239
46238
  sourceType: "module"
46240
46239
  }).program.body;
@@ -48436,7 +48435,7 @@ var __spreadValues = (a, b) => {
48436
48435
  }
48437
48436
  return a;
48438
48437
  };
48439
- const version = "3.4.28";
48438
+ const version = "3.4.30";
48440
48439
  const parseCache = parseCache$1;
48441
48440
  const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages);
48442
48441
  const walk = walk$2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-sfc",
3
- "version": "3.4.28",
3
+ "version": "3.4.30",
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.10",
48
48
  "postcss": "^8.4.38",
49
49
  "source-map-js": "^1.2.0",
50
- "@vue/shared": "3.4.28",
51
- "@vue/compiler-core": "3.4.28",
52
- "@vue/compiler-dom": "3.4.28",
53
- "@vue/compiler-ssr": "3.4.28"
50
+ "@vue/compiler-core": "3.4.30",
51
+ "@vue/compiler-dom": "3.4.30",
52
+ "@vue/compiler-ssr": "3.4.30",
53
+ "@vue/shared": "3.4.30"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@babel/types": "^7.24.7",
@@ -62,6 +62,6 @@
62
62
  "postcss-modules": "^6.0.0",
63
63
  "postcss-selector-parser": "^6.1.0",
64
64
  "pug": "^3.0.3",
65
- "sass": "^1.77.4"
65
+ "sass": "^1.77.5"
66
66
  }
67
67
  }