@vue/compiler-sfc 3.5.27 → 3.5.28

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.27
2
+ * @vue/compiler-sfc v3.5.28
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -7158,7 +7158,7 @@ function requireParser$2 () {
7158
7158
  if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) {
7159
7159
  spaces.before = _space2.slice(0, _space2.length - 1);
7160
7160
  raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1);
7161
- } else if (_space2.startsWith(' ') && _rawSpace2.startsWith(' ')) {
7161
+ } else if (_space2[0] === ' ' && _rawSpace2[0] === ' ') {
7162
7162
  spaces.after = _space2.slice(1);
7163
7163
  raws.spaces.after = _rawSpace2.slice(1);
7164
7164
  } else {
@@ -19810,7 +19810,7 @@ function resolveParserPlugins(lang, userPlugins, dts = false) {
19810
19810
  } else if (userPlugins) {
19811
19811
  userPlugins = userPlugins.filter((p) => p !== "jsx");
19812
19812
  }
19813
- if (lang === "ts" || lang === "mts" || lang === "tsx" || lang === "mtsx") {
19813
+ if (lang === "ts" || lang === "mts" || lang === "tsx" || lang === "cts" || lang === "mtsx") {
19814
19814
  plugins.push(["typescript", { dts }], "explicitResourceManagement");
19815
19815
  if (!userPlugins || !userPlugins.includes("decorators")) {
19816
19816
  plugins.push("decorators-legacy");
@@ -20025,6 +20025,7 @@ const openPattern = /\\{/g;
20025
20025
  const closePattern = /\\}/g;
20026
20026
  const commaPattern = /\\,/g;
20027
20027
  const periodPattern = /\\./g;
20028
+ const EXPANSION_MAX = 100_000;
20028
20029
  function numeric(str) {
20029
20030
  return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
20030
20031
  }
@@ -20069,10 +20070,11 @@ function parseCommaParts(str) {
20069
20070
  parts.push.apply(parts, p);
20070
20071
  return parts;
20071
20072
  }
20072
- function expand(str) {
20073
+ function expand(str, options = {}) {
20073
20074
  if (!str) {
20074
20075
  return [];
20075
20076
  }
20077
+ const { max = EXPANSION_MAX } = options;
20076
20078
  // I don't know why Bash 4.3 does this, but it does.
20077
20079
  // Anything starting with {} will have the first two bytes preserved
20078
20080
  // but *only* at the top level, so {},a}b will not expand to anything,
@@ -20082,7 +20084,7 @@ function expand(str) {
20082
20084
  if (str.slice(0, 2) === '{}') {
20083
20085
  str = '\\{\\}' + str.slice(2);
20084
20086
  }
20085
- return expand_(escapeBraces(str), true).map(unescapeBraces);
20087
+ return expand_(escapeBraces(str), max, true).map(unescapeBraces);
20086
20088
  }
20087
20089
  function embrace(str) {
20088
20090
  return '{' + str + '}';
@@ -20096,7 +20098,7 @@ function lte(i, y) {
20096
20098
  function gte(i, y) {
20097
20099
  return i >= y;
20098
20100
  }
20099
- function expand_(str, isTop) {
20101
+ function expand_(str, max, isTop) {
20100
20102
  /** @type {string[]} */
20101
20103
  const expansions = [];
20102
20104
  const m = balanced('{', '}', str);
@@ -20104,9 +20106,9 @@ function expand_(str, isTop) {
20104
20106
  return [str];
20105
20107
  // no need to expand pre, since it is guaranteed to be free of brace-sets
20106
20108
  const pre = m.pre;
20107
- const post = m.post.length ? expand_(m.post, false) : [''];
20109
+ const post = m.post.length ? expand_(m.post, max, false) : [''];
20108
20110
  if (/\$$/.test(m.pre)) {
20109
- for (let k = 0; k < post.length; k++) {
20111
+ for (let k = 0; k < post.length && k < max; k++) {
20110
20112
  const expansion = pre + '{' + m.body + '}' + post[k];
20111
20113
  expansions.push(expansion);
20112
20114
  }
@@ -20120,7 +20122,7 @@ function expand_(str, isTop) {
20120
20122
  // {a},b}
20121
20123
  if (m.post.match(/,(?!,).*\}/)) {
20122
20124
  str = m.pre + '{' + m.body + escClose + m.post;
20123
- return expand_(str);
20125
+ return expand_(str, max, true);
20124
20126
  }
20125
20127
  return [str];
20126
20128
  }
@@ -20132,7 +20134,7 @@ function expand_(str, isTop) {
20132
20134
  n = parseCommaParts(m.body);
20133
20135
  if (n.length === 1 && n[0] !== undefined) {
20134
20136
  // x{{a,b}}y ==> x{a}y x{b}y
20135
- n = expand_(n[0], false).map(embrace);
20137
+ n = expand_(n[0], max, false).map(embrace);
20136
20138
  //XXX is this necessary? Can't seem to hit it in tests.
20137
20139
  /* c8 ignore start */
20138
20140
  if (n.length === 1) {
@@ -20186,11 +20188,11 @@ function expand_(str, isTop) {
20186
20188
  else {
20187
20189
  N = [];
20188
20190
  for (let j = 0; j < n.length; j++) {
20189
- N.push.apply(N, expand_(n[j], false));
20191
+ N.push.apply(N, expand_(n[j], max, false));
20190
20192
  }
20191
20193
  }
20192
20194
  for (let j = 0; j < N.length; j++) {
20193
- for (let k = 0; k < post.length; k++) {
20195
+ for (let k = 0; k < post.length && expansions.length < max; k++) {
20194
20196
  const expansion = pre + N[j] + post[k];
20195
20197
  if (!isTop || isSequence || expansion) {
20196
20198
  expansions.push(expansion);
@@ -22683,11 +22685,21 @@ function importSourceToScope(ctx, node, scope, source) {
22683
22685
  }
22684
22686
  }
22685
22687
  function resolveExt(filename, fs) {
22686
- filename = filename.replace(/\.js$/, "");
22688
+ let moduleType = "u";
22689
+ if (filename.endsWith(".mjs")) {
22690
+ moduleType = "m";
22691
+ } else if (filename.endsWith(".cjs")) {
22692
+ moduleType = "c";
22693
+ }
22694
+ filename = filename.replace(/\.[cm]?jsx?$/, "");
22687
22695
  const tryResolve = (filename2) => {
22688
22696
  if (fs.fileExists(filename2)) return filename2;
22689
22697
  };
22690
- return tryResolve(filename) || tryResolve(filename + `.ts`) || tryResolve(filename + `.tsx`) || tryResolve(filename + `.d.ts`) || tryResolve(joinPaths(filename, `index.ts`)) || tryResolve(joinPaths(filename, `index.tsx`)) || tryResolve(joinPaths(filename, `index.d.ts`));
22698
+ const resolveTs = () => tryResolve(filename + `.ts`) || tryResolve(filename + `.tsx`) || tryResolve(filename + `.d.ts`);
22699
+ const resolveMts = () => tryResolve(filename + `.mts`) || tryResolve(filename + `.d.mts`);
22700
+ const resolveCts = () => tryResolve(filename + `.cts`) || tryResolve(filename + `.d.cts`);
22701
+ return tryResolve(filename) || // For explicit .mjs/.cjs imports, prefer .mts/.cts declarations first.
22702
+ (moduleType === "m" ? resolveMts() || resolveTs() : moduleType === "c" ? resolveCts() || resolveTs() : resolveTs() || resolveMts() || resolveCts()) || tryResolve(joinPaths(filename, `index.ts`)) || tryResolve(joinPaths(filename, `index.tsx`)) || tryResolve(joinPaths(filename, `index.d.ts`));
22691
22703
  }
22692
22704
  const tsConfigCache = createCache();
22693
22705
  const tsConfigRefMap = /* @__PURE__ */ new Map();
@@ -22803,12 +22815,12 @@ function fileToScope(ctx, filename, asGlobal = false) {
22803
22815
  }
22804
22816
  function parseFile(filename, content, fs, parserPlugins) {
22805
22817
  const ext = path$1.extname(filename);
22806
- if (ext === ".ts" || ext === ".mts" || ext === ".tsx" || ext === ".mtsx") {
22818
+ if (ext === ".ts" || ext === ".mts" || ext === ".tsx" || ext === ".cts" || ext === ".mtsx") {
22807
22819
  return parser$2.parse(content, {
22808
22820
  plugins: resolveParserPlugins(
22809
22821
  ext.slice(1),
22810
22822
  parserPlugins,
22811
- /\.d\.m?ts$/.test(filename)
22823
+ /\.d\.[cm]?ts$/.test(filename)
22812
22824
  ),
22813
22825
  sourceType: "module"
22814
22826
  }).program.body;
@@ -23821,7 +23833,13 @@ function genRuntimePropFromType(ctx, { key, required, type, skipCheck }, hasStat
23821
23833
  if (prop.type === "ObjectProperty") {
23822
23834
  defaultString = `default: ${ctx.getString(prop.value)}`;
23823
23835
  } else {
23824
- defaultString = `${prop.async ? "async " : ""}${prop.kind !== "method" ? `${prop.kind} ` : ""}default() ${ctx.getString(prop.body)}`;
23836
+ let paramsString = "";
23837
+ if (prop.params.length) {
23838
+ const start = prop.params[0].start;
23839
+ const end = prop.params[prop.params.length - 1].end;
23840
+ paramsString = ctx.getString({ start, end });
23841
+ }
23842
+ defaultString = `${prop.async ? "async " : ""}${prop.kind !== "method" ? `${prop.kind} ` : ""}default(${paramsString}) ${ctx.getString(prop.body)}`;
23825
23843
  }
23826
23844
  }
23827
23845
  }
@@ -25181,7 +25199,7 @@ function mergeSourceMaps(scriptMap, templateMap, templateLineOffset) {
25181
25199
  return generator.toJSON();
25182
25200
  }
25183
25201
 
25184
- const version = "3.5.27";
25202
+ const version = "3.5.28";
25185
25203
  const parseCache = parseCache$1;
25186
25204
  const errorMessages = {
25187
25205
  ...CompilerDOM.errorMessages,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compiler-sfc v3.5.27
2
+ * @vue/compiler-sfc v3.5.28
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -2916,6 +2916,8 @@ class EntityDecoder {
2916
2916
  this.excess = 1;
2917
2917
  /** The mode in which the decoder is operating. */
2918
2918
  this.decodeMode = DecodingMode.Strict;
2919
+ /** The number of characters that have been consumed in the current run. */
2920
+ this.runConsumed = 0;
2919
2921
  }
2920
2922
  /** Resets the instance to make it reusable. */
2921
2923
  startEntity(decodeMode) {
@@ -2925,6 +2927,7 @@ class EntityDecoder {
2925
2927
  this.treeIndex = 0;
2926
2928
  this.excess = 1;
2927
2929
  this.consumed = 1;
2930
+ this.runConsumed = 0;
2928
2931
  }
2929
2932
  /**
2930
2933
  * Write an entity to the decoder. This can be called multiple times with partial entities.
@@ -3087,43 +3090,40 @@ class EntityDecoder {
3087
3090
  // Handle compact runs (possibly inline): valueLength == 0 and SEMI_REQUIRED bit set.
3088
3091
  if (valueLength === 0 && (current & BinTrieFlags.FLAG13) !== 0) {
3089
3092
  const runLength = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; /* 2..63 */
3090
- const firstChar = current & BinTrieFlags.JUMP_TABLE;
3091
- // Fast-fail if we don't have enough remaining input for the full run (incomplete entity)
3092
- if (offset + runLength > input.length)
3093
- return -1;
3094
- // Verify first char
3095
- if (input.charCodeAt(offset) !== firstChar) {
3096
- return this.result === 0
3097
- ? 0
3098
- : this.emitNotTerminatedNamedEntity();
3099
- }
3100
- offset++;
3101
- this.excess++;
3102
- // Remaining characters after the first
3103
- const remaining = runLength - 1;
3104
- // Iterate over packed 2-char words
3105
- for (let runPos = 1; runPos < runLength; runPos += 2) {
3106
- const packedWord = decodeTree[this.treeIndex + 1 + ((runPos - 1) >> 1)];
3107
- const low = packedWord & 0xff;
3108
- if (input.charCodeAt(offset) !== low) {
3093
+ // If we are starting a run, check the first char.
3094
+ if (this.runConsumed === 0) {
3095
+ const firstChar = current & BinTrieFlags.JUMP_TABLE;
3096
+ if (input.charCodeAt(offset) !== firstChar) {
3109
3097
  return this.result === 0
3110
3098
  ? 0
3111
3099
  : this.emitNotTerminatedNamedEntity();
3112
3100
  }
3113
3101
  offset++;
3114
3102
  this.excess++;
3115
- const high = (packedWord >> 8) & 0xff;
3116
- if (runPos + 1 < runLength) {
3117
- if (input.charCodeAt(offset) !== high) {
3118
- return this.result === 0
3119
- ? 0
3120
- : this.emitNotTerminatedNamedEntity();
3121
- }
3122
- offset++;
3123
- this.excess++;
3103
+ this.runConsumed++;
3104
+ }
3105
+ // Check remaining characters in the run.
3106
+ while (this.runConsumed < runLength) {
3107
+ if (offset >= input.length) {
3108
+ return -1;
3109
+ }
3110
+ const charIndexInPacked = this.runConsumed - 1;
3111
+ const packedWord = decodeTree[this.treeIndex + 1 + (charIndexInPacked >> 1)];
3112
+ const expectedChar = charIndexInPacked % 2 === 0
3113
+ ? packedWord & 0xff
3114
+ : (packedWord >> 8) & 0xff;
3115
+ if (input.charCodeAt(offset) !== expectedChar) {
3116
+ this.runConsumed = 0;
3117
+ return this.result === 0
3118
+ ? 0
3119
+ : this.emitNotTerminatedNamedEntity();
3124
3120
  }
3121
+ offset++;
3122
+ this.excess++;
3123
+ this.runConsumed++;
3125
3124
  }
3126
- this.treeIndex += 1 + ((remaining + 1) >> 1);
3125
+ this.runConsumed = 0;
3126
+ this.treeIndex += 1 + (runLength >> 1);
3127
3127
  current = decodeTree[this.treeIndex];
3128
3128
  valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
3129
3129
  }
@@ -4876,18 +4876,16 @@ function requireLib () {
4876
4876
  syntaxPlugin
4877
4877
  }) {
4878
4878
  const hasMissingPlugin = reasonCode === "MissingPlugin" || reasonCode === "MissingOneOfPlugins";
4879
- {
4880
- const oldReasonCodes = {
4881
- AccessorCannotDeclareThisParameter: "AccesorCannotDeclareThisParameter",
4882
- AccessorCannotHaveTypeParameters: "AccesorCannotHaveTypeParameters",
4883
- ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: "ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",
4884
- SetAccessorCannotHaveOptionalParameter: "SetAccesorCannotHaveOptionalParameter",
4885
- SetAccessorCannotHaveRestParameter: "SetAccesorCannotHaveRestParameter",
4886
- SetAccessorCannotHaveReturnType: "SetAccesorCannotHaveReturnType"
4887
- };
4888
- if (oldReasonCodes[reasonCode]) {
4889
- reasonCode = oldReasonCodes[reasonCode];
4890
- }
4879
+ const oldReasonCodes = {
4880
+ AccessorCannotDeclareThisParameter: "AccesorCannotDeclareThisParameter",
4881
+ AccessorCannotHaveTypeParameters: "AccesorCannotHaveTypeParameters",
4882
+ ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: "ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",
4883
+ SetAccessorCannotHaveOptionalParameter: "SetAccesorCannotHaveOptionalParameter",
4884
+ SetAccessorCannotHaveRestParameter: "SetAccesorCannotHaveRestParameter",
4885
+ SetAccessorCannotHaveReturnType: "SetAccesorCannotHaveReturnType"
4886
+ };
4887
+ if (oldReasonCodes[reasonCode]) {
4888
+ reasonCode = oldReasonCodes[reasonCode];
4891
4889
  }
4892
4890
  return function constructor(loc, details) {
4893
4891
  const error = new SyntaxError();
@@ -5148,10 +5146,8 @@ function requireLib () {
5148
5146
  }
5149
5147
  parsePrivateName() {
5150
5148
  const node = super.parsePrivateName();
5151
- {
5152
- if (!this.getPluginOption("estree", "classFeatures")) {
5153
- return node;
5154
- }
5149
+ if (!this.getPluginOption("estree", "classFeatures")) {
5150
+ return node;
5155
5151
  }
5156
5152
  return this.convertPrivateNameToPrivateIdentifier(node);
5157
5153
  }
@@ -5162,18 +5158,14 @@ function requireLib () {
5162
5158
  return this.castNodeTo(node, "PrivateIdentifier");
5163
5159
  }
5164
5160
  isPrivateName(node) {
5165
- {
5166
- if (!this.getPluginOption("estree", "classFeatures")) {
5167
- return super.isPrivateName(node);
5168
- }
5161
+ if (!this.getPluginOption("estree", "classFeatures")) {
5162
+ return super.isPrivateName(node);
5169
5163
  }
5170
5164
  return node.type === "PrivateIdentifier";
5171
5165
  }
5172
5166
  getPrivateNameSV(node) {
5173
- {
5174
- if (!this.getPluginOption("estree", "classFeatures")) {
5175
- return super.getPrivateNameSV(node);
5176
- }
5167
+ if (!this.getPluginOption("estree", "classFeatures")) {
5168
+ return super.getPrivateNameSV(node);
5177
5169
  }
5178
5170
  return node.name;
5179
5171
  }
@@ -5221,35 +5213,25 @@ function requireLib () {
5221
5213
  }
5222
5214
  parseClassProperty(...args) {
5223
5215
  const propertyNode = super.parseClassProperty(...args);
5224
- {
5225
- if (!this.getPluginOption("estree", "classFeatures")) {
5226
- return propertyNode;
5227
- }
5228
- }
5229
- {
5230
- this.castNodeTo(propertyNode, "PropertyDefinition");
5216
+ if (!this.getPluginOption("estree", "classFeatures")) {
5217
+ return propertyNode;
5231
5218
  }
5219
+ this.castNodeTo(propertyNode, "PropertyDefinition");
5232
5220
  return propertyNode;
5233
5221
  }
5234
5222
  parseClassPrivateProperty(...args) {
5235
5223
  const propertyNode = super.parseClassPrivateProperty(...args);
5236
- {
5237
- if (!this.getPluginOption("estree", "classFeatures")) {
5238
- return propertyNode;
5239
- }
5240
- }
5241
- {
5242
- this.castNodeTo(propertyNode, "PropertyDefinition");
5224
+ if (!this.getPluginOption("estree", "classFeatures")) {
5225
+ return propertyNode;
5243
5226
  }
5227
+ this.castNodeTo(propertyNode, "PropertyDefinition");
5244
5228
  propertyNode.computed = false;
5245
5229
  return propertyNode;
5246
5230
  }
5247
5231
  parseClassAccessorProperty(node) {
5248
5232
  const accessorPropertyNode = super.parseClassAccessorProperty(node);
5249
- {
5250
- if (!this.getPluginOption("estree", "classFeatures")) {
5251
- return accessorPropertyNode;
5252
- }
5233
+ if (!this.getPluginOption("estree", "classFeatures")) {
5234
+ return accessorPropertyNode;
5253
5235
  }
5254
5236
  if (accessorPropertyNode.abstract && this.hasPlugin("typescript")) {
5255
5237
  delete accessorPropertyNode.abstract;
@@ -5306,14 +5288,11 @@ function requireLib () {
5306
5288
  finishCallExpression(unfinished, optional) {
5307
5289
  const node = super.finishCallExpression(unfinished, optional);
5308
5290
  if (node.callee.type === "Import") {
5309
- var _ref;
5291
+ var _ref, _ref2;
5310
5292
  this.castNodeTo(node, "ImportExpression");
5311
5293
  node.source = node.arguments[0];
5312
5294
  node.options = (_ref = node.arguments[1]) != null ? _ref : null;
5313
- {
5314
- var _ref2;
5315
- node.attributes = (_ref2 = node.arguments[1]) != null ? _ref2 : null;
5316
- }
5295
+ node.attributes = (_ref2 = node.arguments[1]) != null ? _ref2 : null;
5317
5296
  delete node.arguments;
5318
5297
  delete node.callee;
5319
5298
  } else if (node.type === "OptionalCallExpression") {
@@ -5437,9 +5416,7 @@ function requireLib () {
5437
5416
  j_cTag: new TokContext("</tag"),
5438
5417
  j_expr: new TokContext("<tag>...</tag>", true)
5439
5418
  };
5440
- {
5441
- types.template = new TokContext("`", true);
5442
- }
5419
+ types.template = new TokContext("`", true);
5443
5420
  const beforeExpr = true;
5444
5421
  const startsExpr = true;
5445
5422
  const isLoop = true;
@@ -5468,9 +5445,7 @@ function requireLib () {
5468
5445
  this.prefix = !!conf.prefix;
5469
5446
  this.postfix = !!conf.postfix;
5470
5447
  this.binop = conf.binop != null ? conf.binop : null;
5471
- {
5472
- this.updateContext = null;
5473
- }
5448
+ this.updateContext = null;
5474
5449
  }
5475
5450
  }
5476
5451
  const keywords$1 = new Map();
@@ -5971,24 +5946,22 @@ function requireLib () {
5971
5946
  function getExportedToken(token) {
5972
5947
  return tokenTypes[token];
5973
5948
  }
5974
- {
5975
- tokenTypes[8].updateContext = context => {
5949
+ tokenTypes[8].updateContext = context => {
5950
+ context.pop();
5951
+ };
5952
+ tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = context => {
5953
+ context.push(types.brace);
5954
+ };
5955
+ tokenTypes[22].updateContext = context => {
5956
+ if (context[context.length - 1] === types.template) {
5976
5957
  context.pop();
5977
- };
5978
- tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = context => {
5979
- context.push(types.brace);
5980
- };
5981
- tokenTypes[22].updateContext = context => {
5982
- if (context[context.length - 1] === types.template) {
5983
- context.pop();
5984
- } else {
5985
- context.push(types.template);
5986
- }
5987
- };
5988
- tokenTypes[143].updateContext = context => {
5989
- context.push(types.j_expr, types.j_oTag);
5990
- };
5991
- }
5958
+ } else {
5959
+ context.push(types.template);
5960
+ }
5961
+ };
5962
+ tokenTypes[143].updateContext = context => {
5963
+ context.push(types.j_expr, types.j_oTag);
5964
+ };
5992
5965
  let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088f\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5c\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdc-\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c8a\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7dc\ua7f1-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
5993
5966
  let nonASCIIidentifierChars = "\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0897-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1add\u1ae0-\u1aeb\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65";
5994
5967
  const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
@@ -7847,9 +7820,7 @@ function requireLib () {
7847
7820
  parseClassSuper(node) {
7848
7821
  super.parseClassSuper(node);
7849
7822
  if (node.superClass && (this.match(47) || this.match(51))) {
7850
- {
7851
- node.superTypeParameters = this.flowParseTypeParameterInstantiationInExpression();
7852
- }
7823
+ node.superTypeParameters = this.flowParseTypeParameterInstantiationInExpression();
7853
7824
  }
7854
7825
  if (this.isContextual(113)) {
7855
7826
  this.next();
@@ -9645,7 +9616,6 @@ function requireLib () {
9645
9616
  switch (node.type) {
9646
9617
  case "ObjectExpression":
9647
9618
  case "ObjectPattern":
9648
- case "RecordExpression":
9649
9619
  adjustInnerComments(node, node.properties, commentWS);
9650
9620
  break;
9651
9621
  case "CallExpression":
@@ -9665,7 +9635,6 @@ function requireLib () {
9665
9635
  break;
9666
9636
  case "ArrayExpression":
9667
9637
  case "ArrayPattern":
9668
- case "TupleExpression":
9669
9638
  adjustInnerComments(node, node.elements, commentWS);
9670
9639
  break;
9671
9640
  case "ExportNamedDeclaration":
@@ -9673,15 +9642,21 @@ function requireLib () {
9673
9642
  adjustInnerComments(node, node.specifiers, commentWS);
9674
9643
  break;
9675
9644
  case "TSEnumDeclaration":
9676
- {
9677
- adjustInnerComments(node, node.members, commentWS);
9678
- }
9645
+ adjustInnerComments(node, node.members, commentWS);
9679
9646
  break;
9680
9647
  case "TSEnumBody":
9681
9648
  adjustInnerComments(node, node.members, commentWS);
9682
9649
  break;
9683
9650
  default:
9684
9651
  {
9652
+ if (node.type === "RecordExpression") {
9653
+ adjustInnerComments(node, node.properties, commentWS);
9654
+ break;
9655
+ }
9656
+ if (node.type === "TupleExpression") {
9657
+ adjustInnerComments(node, node.elements, commentWS);
9658
+ break;
9659
+ }
9685
9660
  setInnerComments(node, comments);
9686
9661
  }
9687
9662
  }
@@ -11623,19 +11598,17 @@ function requireLib () {
11623
11598
  }
11624
11599
  }
11625
11600
  const NodePrototype = Node.prototype;
11626
- {
11627
- NodePrototype.__clone = function () {
11628
- const newNode = new Node(undefined, this.start, this.loc.start);
11629
- const keys = Object.keys(this);
11630
- for (let i = 0, length = keys.length; i < length; i++) {
11631
- const key = keys[i];
11632
- if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
11633
- newNode[key] = this[key];
11634
- }
11601
+ NodePrototype.__clone = function () {
11602
+ const newNode = new Node(undefined, this.start, this.loc.start);
11603
+ const keys = Object.keys(this);
11604
+ for (let i = 0, length = keys.length; i < length; i++) {
11605
+ const key = keys[i];
11606
+ if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
11607
+ newNode[key] = this[key];
11635
11608
  }
11636
- return newNode;
11637
- };
11638
- }
11609
+ }
11610
+ return newNode;
11611
+ };
11639
11612
  class NodeUtils extends UtilParser {
11640
11613
  startNode() {
11641
11614
  const loc = this.state.startLoc;
@@ -12487,13 +12460,9 @@ function requireLib () {
12487
12460
  this.expect(10);
12488
12461
  if (!this.match(134)) {
12489
12462
  this.raise(TSErrors.UnsupportedImportTypeArgument, this.state.startLoc);
12490
- {
12491
- node.argument = super.parseExprAtom();
12492
- }
12463
+ node.argument = super.parseExprAtom();
12493
12464
  } else {
12494
- {
12495
- node.argument = this.parseStringLiteral(this.state.value);
12496
- }
12465
+ node.argument = this.parseStringLiteral(this.state.value);
12497
12466
  }
12498
12467
  if (this.eat(12)) {
12499
12468
  node.options = this.tsParseImportTypeOptions();
@@ -12505,9 +12474,7 @@ function requireLib () {
12505
12474
  node.qualifier = this.tsParseEntityName(1 | 2);
12506
12475
  }
12507
12476
  if (this.match(47)) {
12508
- {
12509
- node.typeParameters = this.tsParseTypeArguments();
12510
- }
12477
+ node.typeParameters = this.tsParseTypeArguments();
12511
12478
  }
12512
12479
  return this.finishNode(node, "TSImportType");
12513
12480
  }
@@ -12572,9 +12539,7 @@ function requireLib () {
12572
12539
  const node = this.startNode();
12573
12540
  node.typeName = this.tsParseEntityName(1);
12574
12541
  if (!this.hasPrecedingLineBreak() && this.match(47)) {
12575
- {
12576
- node.typeParameters = this.tsParseTypeArguments();
12577
- }
12542
+ node.typeParameters = this.tsParseTypeArguments();
12578
12543
  }
12579
12544
  return this.finishNode(node, "TSTypeReference");
12580
12545
  }
@@ -12597,14 +12562,10 @@ function requireLib () {
12597
12562
  if (this.match(83)) {
12598
12563
  node.exprName = this.tsParseImportType();
12599
12564
  } else {
12600
- {
12601
- node.exprName = this.tsParseEntityName(1 | 2);
12602
- }
12565
+ node.exprName = this.tsParseEntityName(1 | 2);
12603
12566
  }
12604
12567
  if (!this.hasPrecedingLineBreak() && this.match(47)) {
12605
- {
12606
- node.typeParameters = this.tsParseTypeArguments();
12607
- }
12568
+ node.typeParameters = this.tsParseTypeArguments();
12608
12569
  }
12609
12570
  return this.finishNode(node, "TSTypeQuery");
12610
12571
  }
@@ -12825,12 +12786,10 @@ function requireLib () {
12825
12786
  node.readonly = true;
12826
12787
  }
12827
12788
  this.expect(0);
12828
- {
12829
- const typeParameter = this.startNode();
12830
- typeParameter.name = this.tsParseTypeParameterName();
12831
- typeParameter.constraint = this.tsExpectThenParseType(58);
12832
- node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
12833
- }
12789
+ const typeParameter = this.startNode();
12790
+ typeParameter.name = this.tsParseTypeParameterName();
12791
+ typeParameter.constraint = this.tsExpectThenParseType(58);
12792
+ node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
12834
12793
  node.nameType = this.eatContextual(93) ? this.tsParseType() : null;
12835
12794
  this.expect(3);
12836
12795
  if (this.match(53)) {
@@ -12962,11 +12921,9 @@ function requireLib () {
12962
12921
  return this.finishNode(node, "TSLiteralType");
12963
12922
  }
12964
12923
  tsParseTemplateLiteralType() {
12965
- {
12966
- const node = this.startNode();
12967
- node.literal = super.parseTemplate(false);
12968
- return this.finishNode(node, "TSLiteralType");
12969
- }
12924
+ const node = this.startNode();
12925
+ node.literal = super.parseTemplate(false);
12926
+ return this.finishNode(node, "TSLiteralType");
12970
12927
  }
12971
12928
  parseTemplateSubstitution() {
12972
12929
  if (this.state.inType) return this.tsParseType();
@@ -13296,14 +13253,12 @@ function requireLib () {
13296
13253
  tsParseHeritageClause(token) {
13297
13254
  const originalStartLoc = this.state.startLoc;
13298
13255
  const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", () => {
13299
- {
13300
- const node = this.startNode();
13301
- node.expression = this.tsParseEntityName(1 | 2);
13302
- if (this.match(47)) {
13303
- node.typeParameters = this.tsParseTypeArguments();
13304
- }
13305
- return this.finishNode(node, "TSExpressionWithTypeArguments");
13256
+ const node = this.startNode();
13257
+ node.expression = this.tsParseEntityName(1 | 2);
13258
+ if (this.match(47)) {
13259
+ node.typeParameters = this.tsParseTypeArguments();
13306
13260
  }
13261
+ return this.finishNode(node, "TSExpressionWithTypeArguments");
13307
13262
  });
13308
13263
  if (!delimitedList.length) {
13309
13264
  this.raise(TSErrors.EmptyHeritageClauseType, originalStartLoc, {
@@ -13419,11 +13374,9 @@ function requireLib () {
13419
13374
  this.expectContextual(126);
13420
13375
  node.id = this.parseIdentifier();
13421
13376
  this.checkIdentifier(node.id, node.const ? 8971 : 8459);
13422
- {
13423
- this.expect(5);
13424
- node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
13425
- this.expect(8);
13426
- }
13377
+ this.expect(5);
13378
+ node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
13379
+ this.expect(8);
13427
13380
  return this.finishNode(node, "TSEnumDeclaration");
13428
13381
  }
13429
13382
  tsParseEnumBody() {
@@ -13462,9 +13415,7 @@ function requireLib () {
13462
13415
  tsParseAmbientExternalModuleDeclaration(node) {
13463
13416
  if (this.isContextual(112)) {
13464
13417
  node.kind = "global";
13465
- {
13466
- node.global = true;
13467
- }
13418
+ node.global = true;
13468
13419
  node.id = this.parseIdentifier();
13469
13420
  } else if (this.match(134)) {
13470
13421
  node.kind = "module";
@@ -13484,9 +13435,7 @@ function requireLib () {
13484
13435
  return this.finishNode(node, "TSModuleDeclaration");
13485
13436
  }
13486
13437
  tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier, isExport) {
13487
- {
13488
- node.isExport = isExport || false;
13489
- }
13438
+ node.isExport = isExport || false;
13490
13439
  node.id = maybeDefaultIdentifier || this.parseIdentifier();
13491
13440
  this.checkIdentifier(node.id, 4096);
13492
13441
  this.expect(29);
@@ -13808,9 +13757,7 @@ function requireLib () {
13808
13757
  }
13809
13758
  if (tokenIsTemplate(this.state.type)) {
13810
13759
  const result = super.parseTaggedTemplateExpression(base, startLoc, state);
13811
- {
13812
- result.typeParameters = typeArguments;
13813
- }
13760
+ result.typeParameters = typeArguments;
13814
13761
  return result;
13815
13762
  }
13816
13763
  if (!noCalls && this.eat(10)) {
@@ -13818,23 +13765,19 @@ function requireLib () {
13818
13765
  node.callee = base;
13819
13766
  node.arguments = this.parseCallExpressionArguments();
13820
13767
  this.tsCheckForInvalidTypeCasts(node.arguments);
13821
- {
13822
- node.typeParameters = typeArguments;
13823
- }
13768
+ node.typeParameters = typeArguments;
13824
13769
  if (state.optionalChainMember) {
13825
13770
  node.optional = isOptionalCall;
13826
13771
  }
13827
13772
  return this.finishCallExpression(node, state.optionalChainMember);
13828
13773
  }
13829
13774
  const tokenType = this.state.type;
13830
- if (tokenType === 48 || tokenType === 52 || tokenType !== 10 && tokenCanStartExpression(tokenType) && !this.hasPrecedingLineBreak()) {
13775
+ if (tokenType === 48 || tokenType === 52 || tokenType !== 10 && tokenType !== 93 && tokenType !== 120 && tokenCanStartExpression(tokenType) && !this.hasPrecedingLineBreak()) {
13831
13776
  return;
13832
13777
  }
13833
13778
  const node = this.startNodeAt(startLoc);
13834
13779
  node.expression = base;
13835
- {
13836
- node.typeParameters = typeArguments;
13837
- }
13780
+ node.typeParameters = typeArguments;
13838
13781
  return this.finishNode(node, "TSInstantiationExpression");
13839
13782
  });
13840
13783
  if (missingParenErrorLoc) {
@@ -13861,9 +13804,7 @@ function requireLib () {
13861
13804
  callee
13862
13805
  } = node;
13863
13806
  if (callee.type === "TSInstantiationExpression" && !((_callee$extra = callee.extra) != null && _callee$extra.parenthesized)) {
13864
- {
13865
- node.typeParameters = callee.typeParameters;
13866
- }
13807
+ node.typeParameters = callee.typeParameters;
13867
13808
  node.callee = callee.expression;
13868
13809
  }
13869
13810
  }
@@ -13953,9 +13894,7 @@ function requireLib () {
13953
13894
  nodeImportEquals.importKind = "value";
13954
13895
  }
13955
13896
  const declaration = this.tsParseImportEqualsDeclaration(nodeImportEquals, maybeDefaultIdentifier, true);
13956
- {
13957
- return declaration;
13958
- }
13897
+ return declaration;
13959
13898
  } else if (this.eat(29)) {
13960
13899
  const assign = node;
13961
13900
  assign.expression = super.parseExpression();
@@ -14308,8 +14247,16 @@ function requireLib () {
14308
14247
  }
14309
14248
  parseClassSuper(node) {
14310
14249
  super.parseClassSuper(node);
14311
- if (node.superClass && (this.match(47) || this.match(51))) {
14312
- {
14250
+ if (node.superClass) {
14251
+ if (node.superClass.type === "TSInstantiationExpression") {
14252
+ const tsInstantiationExpression = node.superClass;
14253
+ const superClass = tsInstantiationExpression.expression;
14254
+ this.takeSurroundingComments(superClass, superClass.start, superClass.end);
14255
+ const superTypeArguments = tsInstantiationExpression.typeParameters;
14256
+ this.takeSurroundingComments(superTypeArguments, superTypeArguments.start, superTypeArguments.end);
14257
+ node.superClass = superClass;
14258
+ node.superTypeParameters = superTypeArguments;
14259
+ } else if (this.match(47) || this.match(51)) {
14313
14260
  node.superTypeParameters = this.tsParseTypeArgumentsInExpression();
14314
14261
  }
14315
14262
  }
@@ -14525,9 +14472,7 @@ function requireLib () {
14525
14472
  const typeArguments = this.tsParseTypeArgumentsInExpression();
14526
14473
  if (this.match(10)) {
14527
14474
  const call = super.parseMaybeDecoratorArguments(expr, startLoc);
14528
- {
14529
- call.typeParameters = typeArguments;
14530
- }
14475
+ call.typeParameters = typeArguments;
14531
14476
  return call;
14532
14477
  }
14533
14478
  this.unexpected(null, 10);
@@ -14618,9 +14563,7 @@ function requireLib () {
14618
14563
  if (this.match(47) || this.match(51)) {
14619
14564
  const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArgumentsInExpression());
14620
14565
  if (typeArguments) {
14621
- {
14622
- node.typeParameters = typeArguments;
14623
- }
14566
+ node.typeParameters = typeArguments;
14624
14567
  }
14625
14568
  }
14626
14569
  return super.jsxParseOpeningElementAfterName(node);
@@ -15068,7 +15011,8 @@ function requireLib () {
15068
15011
  return false;
15069
15012
  }
15070
15013
  verifyBreakContinue(node, isBreak) {
15071
- if (node.label && node.label.type === "Placeholder") return;
15014
+ var _node$label;
15015
+ if (((_node$label = node.label) == null ? void 0 : _node$label.type) === "Placeholder") return;
15072
15016
  super.verifyBreakContinue(node, isBreak);
15073
15017
  }
15074
15018
  parseExpressionStatement(node, expr) {
@@ -15241,6 +15185,7 @@ function requireLib () {
15241
15185
  throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${proposalList}.`);
15242
15186
  }
15243
15187
  if (proposal === "hack") {
15188
+ var _pluginsMap$get;
15244
15189
  if (pluginsMap.has("placeholders")) {
15245
15190
  throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");
15246
15191
  }
@@ -15252,25 +15197,20 @@ function requireLib () {
15252
15197
  const tokenList = TOPIC_TOKENS.map(t => `"${t}"`).join(", ");
15253
15198
  throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${tokenList}.`);
15254
15199
  }
15255
- {
15256
- var _pluginsMap$get;
15257
- if (topicToken === "#" && ((_pluginsMap$get = pluginsMap.get("recordAndTuple")) == null ? void 0 : _pluginsMap$get.syntaxType) === "hash") {
15258
- throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`);
15259
- }
15200
+ if (topicToken === "#" && ((_pluginsMap$get = pluginsMap.get("recordAndTuple")) == null ? void 0 : _pluginsMap$get.syntaxType) === "hash") {
15201
+ throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`);
15260
15202
  }
15261
15203
  } else if (proposal === "smart" && ((_pluginsMap$get2 = pluginsMap.get("recordAndTuple")) == null ? void 0 : _pluginsMap$get2.syntaxType) === "hash") {
15262
15204
  throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple", pluginsMap.get("recordAndTuple")])}\`.`);
15263
15205
  }
15264
15206
  }
15265
15207
  if (pluginsMap.has("moduleAttributes")) {
15266
- {
15267
- if (pluginsMap.has("deprecatedImportAssert") || pluginsMap.has("importAssertions")) {
15268
- throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");
15269
- }
15270
- const moduleAttributesVersionPluginOption = pluginsMap.get("moduleAttributes").version;
15271
- if (moduleAttributesVersionPluginOption !== "may-2020") {
15272
- throw new Error("The 'moduleAttributes' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is 'may-2020'.");
15273
- }
15208
+ if (pluginsMap.has("deprecatedImportAssert") || pluginsMap.has("importAssertions")) {
15209
+ throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");
15210
+ }
15211
+ const moduleAttributesVersionPluginOption = pluginsMap.get("moduleAttributes").version;
15212
+ if (moduleAttributesVersionPluginOption !== "may-2020") {
15213
+ throw new Error("The 'moduleAttributes' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is 'may-2020'.");
15274
15214
  }
15275
15215
  }
15276
15216
  if (pluginsMap.has("importAssertions")) {
@@ -15278,19 +15218,15 @@ function requireLib () {
15278
15218
  throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");
15279
15219
  }
15280
15220
  }
15281
- if (!pluginsMap.has("deprecatedImportAssert") && pluginsMap.has("importAttributes") && pluginsMap.get("importAttributes").deprecatedAssertSyntax) {
15282
- {
15283
- pluginsMap.set("deprecatedImportAssert", {});
15284
- }
15221
+ if (pluginsMap.has("deprecatedImportAssert")) ;else if (pluginsMap.has("importAttributes") && pluginsMap.get("importAttributes").deprecatedAssertSyntax) {
15222
+ pluginsMap.set("deprecatedImportAssert", {});
15285
15223
  }
15286
15224
  if (pluginsMap.has("recordAndTuple")) {
15287
- {
15288
- const syntaxType = pluginsMap.get("recordAndTuple").syntaxType;
15289
- if (syntaxType != null) {
15290
- const RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"];
15291
- if (!RECORD_AND_TUPLE_SYNTAX_TYPES.includes(syntaxType)) {
15292
- throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map(p => `'${p}'`).join(", "));
15293
- }
15225
+ const syntaxType = pluginsMap.get("recordAndTuple").syntaxType;
15226
+ if (syntaxType != null) {
15227
+ const RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"];
15228
+ if (!RECORD_AND_TUPLE_SYNTAX_TYPES.includes(syntaxType)) {
15229
+ throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map(p => `'${p}'`).join(", "));
15294
15230
  }
15295
15231
  }
15296
15232
  }
@@ -15990,14 +15926,12 @@ function requireLib () {
15990
15926
  throw this.unexpected();
15991
15927
  }
15992
15928
  default:
15993
- {
15994
- if (type === 137) {
15995
- return this.parseDecimalLiteral(this.state.value);
15996
- } else if (type === 2 || type === 1) {
15997
- return this.parseArrayLike(this.state.type === 2 ? 4 : 3, true);
15998
- } else if (type === 6 || type === 7) {
15999
- return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true);
16000
- }
15929
+ if (type === 137) {
15930
+ return this.parseDecimalLiteral(this.state.value);
15931
+ } else if (type === 2 || type === 1) {
15932
+ return this.parseArrayLike(this.state.type === 2 ? 4 : 3, true);
15933
+ } else if (type === 6 || type === 7) {
15934
+ return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true);
16001
15935
  }
16002
15936
  if (tokenIsIdentifier(type)) {
16003
15937
  if (this.isContextual(127) && this.lookaheadInLineCharCode() === 123) {
@@ -16122,16 +16056,12 @@ function requireLib () {
16122
16056
  const node = this.startNode();
16123
16057
  this.next();
16124
16058
  if (this.match(10) && !this.scope.allowDirectSuper) {
16125
- {
16126
- if (!(this.optionFlags & 16)) {
16127
- this.raise(Errors.SuperNotAllowed, node);
16128
- }
16059
+ if (!(this.optionFlags & 16)) {
16060
+ this.raise(Errors.SuperNotAllowed, node);
16129
16061
  }
16130
16062
  } else if (!this.scope.allowSuper) {
16131
- {
16132
- if (!(this.optionFlags & 16)) {
16133
- this.raise(Errors.UnexpectedSuper, node);
16134
- }
16063
+ if (!(this.optionFlags & 16)) {
16064
+ this.raise(Errors.UnexpectedSuper, node);
16135
16065
  }
16136
16066
  }
16137
16067
  if (!this.match(10) && !this.match(0) && !this.match(16)) {
@@ -16211,9 +16141,7 @@ function requireLib () {
16211
16141
  return this.parseLiteral(value, "NumericLiteral");
16212
16142
  }
16213
16143
  parseBigIntLiteral(value) {
16214
- {
16215
- return this.parseLiteral(value, "BigIntLiteral");
16216
- }
16144
+ return this.parseLiteral(value, "BigIntLiteral");
16217
16145
  }
16218
16146
  parseDecimalLiteral(value) {
16219
16147
  return this.parseLiteral(value, "DecimalLiteral");
@@ -16433,10 +16361,8 @@ function requireLib () {
16433
16361
  if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") {
16434
16362
  this.raise(Errors.InvalidRecordProperty, prop);
16435
16363
  }
16436
- {
16437
- if (prop.shorthand) {
16438
- this.addExtra(prop, "shorthand", true);
16439
- }
16364
+ if (prop.shorthand) {
16365
+ this.addExtra(prop, "shorthand", true);
16440
16366
  }
16441
16367
  node.properties.push(prop);
16442
16368
  }
@@ -17109,100 +17035,98 @@ function requireLib () {
17109
17035
  type
17110
17036
  } = token;
17111
17037
  if (typeof type === "number") {
17112
- {
17113
- if (type === 139) {
17114
- const {
17115
- loc,
17116
- start,
17117
- value,
17118
- end
17119
- } = token;
17120
- const hashEndPos = start + 1;
17121
- const hashEndLoc = createPositionWithColumnOffset(loc.start, 1);
17122
- tokens.splice(i, 1, new Token({
17123
- type: getExportedToken(27),
17124
- value: "#",
17038
+ if (type === 139) {
17039
+ const {
17040
+ loc,
17041
+ start,
17042
+ value,
17043
+ end
17044
+ } = token;
17045
+ const hashEndPos = start + 1;
17046
+ const hashEndLoc = createPositionWithColumnOffset(loc.start, 1);
17047
+ tokens.splice(i, 1, new Token({
17048
+ type: getExportedToken(27),
17049
+ value: "#",
17050
+ start: start,
17051
+ end: hashEndPos,
17052
+ startLoc: loc.start,
17053
+ endLoc: hashEndLoc
17054
+ }), new Token({
17055
+ type: getExportedToken(132),
17056
+ value: value,
17057
+ start: hashEndPos,
17058
+ end: end,
17059
+ startLoc: hashEndLoc,
17060
+ endLoc: loc.end
17061
+ }));
17062
+ i++;
17063
+ continue;
17064
+ }
17065
+ if (tokenIsTemplate(type)) {
17066
+ const {
17067
+ loc,
17068
+ start,
17069
+ value,
17070
+ end
17071
+ } = token;
17072
+ const backquoteEnd = start + 1;
17073
+ const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1);
17074
+ let startToken;
17075
+ if (input.charCodeAt(start - startIndex) === 96) {
17076
+ startToken = new Token({
17077
+ type: getExportedToken(22),
17078
+ value: "`",
17125
17079
  start: start,
17126
- end: hashEndPos,
17080
+ end: backquoteEnd,
17127
17081
  startLoc: loc.start,
17128
- endLoc: hashEndLoc
17129
- }), new Token({
17130
- type: getExportedToken(132),
17131
- value: value,
17132
- start: hashEndPos,
17082
+ endLoc: backquoteEndLoc
17083
+ });
17084
+ } else {
17085
+ startToken = new Token({
17086
+ type: getExportedToken(8),
17087
+ value: "}",
17088
+ start: start,
17089
+ end: backquoteEnd,
17090
+ startLoc: loc.start,
17091
+ endLoc: backquoteEndLoc
17092
+ });
17093
+ }
17094
+ let templateValue, templateElementEnd, templateElementEndLoc, endToken;
17095
+ if (type === 24) {
17096
+ templateElementEnd = end - 1;
17097
+ templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1);
17098
+ templateValue = value === null ? null : value.slice(1, -1);
17099
+ endToken = new Token({
17100
+ type: getExportedToken(22),
17101
+ value: "`",
17102
+ start: templateElementEnd,
17133
17103
  end: end,
17134
- startLoc: hashEndLoc,
17104
+ startLoc: templateElementEndLoc,
17135
17105
  endLoc: loc.end
17136
- }));
17137
- i++;
17138
- continue;
17139
- }
17140
- if (tokenIsTemplate(type)) {
17141
- const {
17142
- loc,
17143
- start,
17144
- value,
17145
- end
17146
- } = token;
17147
- const backquoteEnd = start + 1;
17148
- const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1);
17149
- let startToken;
17150
- if (input.charCodeAt(start - startIndex) === 96) {
17151
- startToken = new Token({
17152
- type: getExportedToken(22),
17153
- value: "`",
17154
- start: start,
17155
- end: backquoteEnd,
17156
- startLoc: loc.start,
17157
- endLoc: backquoteEndLoc
17158
- });
17159
- } else {
17160
- startToken = new Token({
17161
- type: getExportedToken(8),
17162
- value: "}",
17163
- start: start,
17164
- end: backquoteEnd,
17165
- startLoc: loc.start,
17166
- endLoc: backquoteEndLoc
17167
- });
17168
- }
17169
- let templateValue, templateElementEnd, templateElementEndLoc, endToken;
17170
- if (type === 24) {
17171
- templateElementEnd = end - 1;
17172
- templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1);
17173
- templateValue = value === null ? null : value.slice(1, -1);
17174
- endToken = new Token({
17175
- type: getExportedToken(22),
17176
- value: "`",
17177
- start: templateElementEnd,
17178
- end: end,
17179
- startLoc: templateElementEndLoc,
17180
- endLoc: loc.end
17181
- });
17182
- } else {
17183
- templateElementEnd = end - 2;
17184
- templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2);
17185
- templateValue = value === null ? null : value.slice(1, -2);
17186
- endToken = new Token({
17187
- type: getExportedToken(23),
17188
- value: "${",
17189
- start: templateElementEnd,
17190
- end: end,
17191
- startLoc: templateElementEndLoc,
17192
- endLoc: loc.end
17193
- });
17194
- }
17195
- tokens.splice(i, 1, startToken, new Token({
17196
- type: getExportedToken(20),
17197
- value: templateValue,
17198
- start: backquoteEnd,
17199
- end: templateElementEnd,
17200
- startLoc: backquoteEndLoc,
17201
- endLoc: templateElementEndLoc
17202
- }), endToken);
17203
- i += 2;
17204
- continue;
17106
+ });
17107
+ } else {
17108
+ templateElementEnd = end - 2;
17109
+ templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2);
17110
+ templateValue = value === null ? null : value.slice(1, -2);
17111
+ endToken = new Token({
17112
+ type: getExportedToken(23),
17113
+ value: "${",
17114
+ start: templateElementEnd,
17115
+ end: end,
17116
+ startLoc: templateElementEndLoc,
17117
+ endLoc: loc.end
17118
+ });
17205
17119
  }
17120
+ tokens.splice(i, 1, startToken, new Token({
17121
+ type: getExportedToken(20),
17122
+ value: templateValue,
17123
+ start: backquoteEnd,
17124
+ end: templateElementEnd,
17125
+ startLoc: backquoteEndLoc,
17126
+ endLoc: templateElementEndLoc
17127
+ }), endToken);
17128
+ i += 2;
17129
+ continue;
17206
17130
  }
17207
17131
  token.type = getExportedToken(type);
17208
17132
  }
@@ -18927,9 +18851,7 @@ function requireLib () {
18927
18851
  }
18928
18852
  maybeParseImportAttributes(node) {
18929
18853
  let attributes;
18930
- {
18931
- var useWith = false;
18932
- }
18854
+ var useWith = false;
18933
18855
  if (this.match(76)) {
18934
18856
  if (this.hasPrecedingLineBreak() && this.lookaheadCharCode() === 40) {
18935
18857
  return;
@@ -18941,9 +18863,7 @@ function requireLib () {
18941
18863
  } else {
18942
18864
  attributes = this.parseImportAttributes();
18943
18865
  }
18944
- {
18945
- useWith = true;
18946
- }
18866
+ useWith = true;
18947
18867
  } else if (this.isContextual(94) && !this.hasPrecedingLineBreak()) {
18948
18868
  if (!this.hasPlugin("deprecatedImportAssert") && !this.hasPlugin("importAssertions")) {
18949
18869
  this.raise(Errors.ImportAttributesUseAssert, this.state.startLoc);
@@ -41308,7 +41228,7 @@ function requireParser () {
41308
41228
  if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) {
41309
41229
  spaces.before = _space2.slice(0, _space2.length - 1);
41310
41230
  raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1);
41311
- } else if (_space2.startsWith(' ') && _rawSpace2.startsWith(' ')) {
41231
+ } else if (_space2[0] === ' ' && _rawSpace2[0] === ' ') {
41312
41232
  spaces.after = _space2.slice(1);
41313
41233
  raws.spaces.after = _rawSpace2.slice(1);
41314
41234
  } else {
@@ -47553,7 +47473,7 @@ function resolveParserPlugins(lang, userPlugins, dts = false) {
47553
47473
  } else if (userPlugins) {
47554
47474
  userPlugins = userPlugins.filter((p) => p !== "jsx");
47555
47475
  }
47556
- if (lang === "ts" || lang === "mts" || lang === "tsx" || lang === "mtsx") {
47476
+ if (lang === "ts" || lang === "mts" || lang === "tsx" || lang === "cts" || lang === "mtsx") {
47557
47477
  plugins.push(["typescript", { dts }], "explicitResourceManagement");
47558
47478
  if (!userPlugins || !userPlugins.includes("decorators")) {
47559
47479
  plugins.push("decorators-legacy");
@@ -48403,11 +48323,21 @@ function importSourceToScope(ctx, node, scope, source) {
48403
48323
  }
48404
48324
  }
48405
48325
  function resolveExt(filename, fs) {
48406
- filename = filename.replace(/\.js$/, "");
48326
+ let moduleType = "u";
48327
+ if (filename.endsWith(".mjs")) {
48328
+ moduleType = "m";
48329
+ } else if (filename.endsWith(".cjs")) {
48330
+ moduleType = "c";
48331
+ }
48332
+ filename = filename.replace(/\.[cm]?jsx?$/, "");
48407
48333
  const tryResolve = (filename2) => {
48408
48334
  if (fs.fileExists(filename2)) return filename2;
48409
48335
  };
48410
- return tryResolve(filename) || tryResolve(filename + `.ts`) || tryResolve(filename + `.tsx`) || tryResolve(filename + `.d.ts`) || tryResolve(joinPaths(filename, `index.ts`)) || tryResolve(joinPaths(filename, `index.tsx`)) || tryResolve(joinPaths(filename, `index.d.ts`));
48336
+ const resolveTs = () => tryResolve(filename + `.ts`) || tryResolve(filename + `.tsx`) || tryResolve(filename + `.d.ts`);
48337
+ const resolveMts = () => tryResolve(filename + `.mts`) || tryResolve(filename + `.d.mts`);
48338
+ const resolveCts = () => tryResolve(filename + `.cts`) || tryResolve(filename + `.d.cts`);
48339
+ return tryResolve(filename) || // For explicit .mjs/.cjs imports, prefer .mts/.cts declarations first.
48340
+ (moduleType === "m" ? resolveMts() || resolveTs() : moduleType === "c" ? resolveCts() || resolveTs() : resolveTs() || resolveMts() || resolveCts()) || tryResolve(joinPaths(filename, `index.ts`)) || tryResolve(joinPaths(filename, `index.tsx`)) || tryResolve(joinPaths(filename, `index.d.ts`));
48411
48341
  }
48412
48342
  const tsConfigCache = createCache();
48413
48343
  const tsConfigRefMap = /* @__PURE__ */ new Map();
@@ -48434,12 +48364,12 @@ function fileToScope(ctx, filename, asGlobal = false) {
48434
48364
  }
48435
48365
  function parseFile(filename, content, fs, parserPlugins) {
48436
48366
  const ext = extname(filename);
48437
- if (ext === ".ts" || ext === ".mts" || ext === ".tsx" || ext === ".mtsx") {
48367
+ if (ext === ".ts" || ext === ".mts" || ext === ".tsx" || ext === ".cts" || ext === ".mtsx") {
48438
48368
  return libExports.parse(content, {
48439
48369
  plugins: resolveParserPlugins(
48440
48370
  ext.slice(1),
48441
48371
  parserPlugins,
48442
- /\.d\.m?ts$/.test(filename)
48372
+ /\.d\.[cm]?ts$/.test(filename)
48443
48373
  ),
48444
48374
  sourceType: "module"
48445
48375
  }).program.body;
@@ -49452,7 +49382,13 @@ function genRuntimePropFromType(ctx, { key, required, type, skipCheck }, hasStat
49452
49382
  if (prop.type === "ObjectProperty") {
49453
49383
  defaultString = `default: ${ctx.getString(prop.value)}`;
49454
49384
  } else {
49455
- defaultString = `${prop.async ? "async " : ""}${prop.kind !== "method" ? `${prop.kind} ` : ""}default() ${ctx.getString(prop.body)}`;
49385
+ let paramsString = "";
49386
+ if (prop.params.length) {
49387
+ const start = prop.params[0].start;
49388
+ const end = prop.params[prop.params.length - 1].end;
49389
+ paramsString = ctx.getString({ start, end });
49390
+ }
49391
+ defaultString = `${prop.async ? "async " : ""}${prop.kind !== "method" ? `${prop.kind} ` : ""}default(${paramsString}) ${ctx.getString(prop.body)}`;
49456
49392
  }
49457
49393
  }
49458
49394
  }
@@ -50842,7 +50778,7 @@ var __spreadValues = (a, b) => {
50842
50778
  }
50843
50779
  return a;
50844
50780
  };
50845
- const version = "3.5.27";
50781
+ const version = "3.5.28";
50846
50782
  const parseCache = parseCache$1;
50847
50783
  const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages);
50848
50784
  const walk = walk$2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-sfc",
3
- "version": "3.5.27",
3
+ "version": "3.5.28",
4
4
  "description": "@vue/compiler-sfc",
5
5
  "main": "dist/compiler-sfc.cjs.js",
6
6
  "module": "dist/compiler-sfc.esm-browser.js",
@@ -42,26 +42,26 @@
42
42
  },
43
43
  "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-sfc#readme",
44
44
  "dependencies": {
45
- "@babel/parser": "^7.28.5",
45
+ "@babel/parser": "^7.29.0",
46
46
  "estree-walker": "^2.0.2",
47
47
  "magic-string": "^0.30.21",
48
48
  "postcss": "^8.5.6",
49
49
  "source-map-js": "^1.2.1",
50
- "@vue/compiler-ssr": "3.5.27",
51
- "@vue/compiler-core": "3.5.27",
52
- "@vue/compiler-dom": "3.5.27",
53
- "@vue/shared": "3.5.27"
50
+ "@vue/compiler-core": "3.5.28",
51
+ "@vue/compiler-dom": "3.5.28",
52
+ "@vue/compiler-ssr": "3.5.28",
53
+ "@vue/shared": "3.5.28"
54
54
  },
55
55
  "devDependencies": {
56
- "@babel/types": "^7.28.5",
56
+ "@babel/types": "^7.29.0",
57
57
  "@vue/consolidate": "^1.0.0",
58
58
  "hash-sum": "^2.0.0",
59
59
  "lru-cache": "10.1.0",
60
60
  "merge-source-map": "^1.1.0",
61
- "minimatch": "~10.1.1",
61
+ "minimatch": "~10.1.2",
62
62
  "postcss-modules": "^6.0.1",
63
- "postcss-selector-parser": "^7.1.0",
63
+ "postcss-selector-parser": "^7.1.1",
64
64
  "pug": "^3.0.3",
65
- "sass": "^1.96.0"
65
+ "sass": "^1.97.3"
66
66
  }
67
67
  }