@artel/artc 0.9.26074-pre-release → 0.9.26075-pre-release

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.
package/build/Cli.js CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CommandLineCompiler
4
- } from "./chunk-X3V7QMLU.js";
5
- import "./chunk-VJJPNCJV.js";
4
+ } from "./chunk-ADMEZFYB.js";
5
+ import "./chunk-XEK6QRUU.js";
6
6
  import {
7
7
  __async
8
- } from "./chunk-XJ5TJ7IA.js";
8
+ } from "./chunk-DBK277JW.js";
9
9
 
10
10
  // source/Cli.ts
11
11
  function main() {
package/build/api/Api.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  ImportEmitKind,
9
9
  NotEmittedPackageInfo,
10
10
  SourceMapMode
11
- } from "../chunk-VJJPNCJV.js";
11
+ } from "../chunk-XEK6QRUU.js";
12
12
  import {
13
13
  AccessKind,
14
14
  AccessedFunction_entity,
@@ -81,8 +81,8 @@ import {
81
81
  DiagnosticCode,
82
82
  DiagnosticData,
83
83
  DiagnosticFlags,
84
- DiagnosticKind,
85
84
  DiagnosticLocation,
85
+ DiagnosticSeverity,
86
86
  DirectSubtypeInfo,
87
87
  DirectoryEntry,
88
88
  DisplayableArray,
@@ -220,6 +220,7 @@ import {
220
220
  TextTranslationPackageEntityInfo,
221
221
  TextTranslationPackageM,
222
222
  Token,
223
+ TokenErrorCode,
223
224
  TokenKind,
224
225
  Translation,
225
226
  TsInteropInputs,
@@ -328,7 +329,7 @@ import {
328
329
  withoutQuotes,
329
330
  withoutTemplateQuotes,
330
331
  yieldTask
331
- } from "../chunk-XJ5TJ7IA.js";
332
+ } from "../chunk-DBK277JW.js";
332
333
  export {
333
334
  AccessKind,
334
335
  AccessedFunction_entity,
@@ -403,8 +404,8 @@ export {
403
404
  DiagnosticData,
404
405
  DiagnosticFlags,
405
406
  DiagnosticFormatter,
406
- DiagnosticKind,
407
407
  DiagnosticLocation,
408
+ DiagnosticSeverity,
408
409
  DirectSubtypeInfo,
409
410
  DirectoryEntry,
410
411
  DisplayableArray,
@@ -546,6 +547,7 @@ export {
546
547
  TextTranslationPackageEntityInfo,
547
548
  TextTranslationPackageM,
548
549
  Token,
550
+ TokenErrorCode,
549
551
  Translation,
550
552
  TsInteropInputs,
551
553
  TypeEntity,
@@ -6,9 +6,9 @@ import {
6
6
  PhysicalFileSystem,
7
7
  PhysicalTypeScriptLibrariesProvider,
8
8
  PrintingDiagnosticAcceptor
9
- } from "../chunk-X3V7QMLU.js";
10
- import "../chunk-VJJPNCJV.js";
11
- import "../chunk-XJ5TJ7IA.js";
9
+ } from "../chunk-ADMEZFYB.js";
10
+ import "../chunk-XEK6QRUU.js";
11
+ import "../chunk-DBK277JW.js";
12
12
  export {
13
13
  CommandLineCompiler,
14
14
  FileSystemUri,
@@ -147,7 +147,7 @@ import {
147
147
  traverseTreeAsync,
148
148
  traverseTreeAsync2,
149
149
  yieldTask
150
- } from "../chunk-XJ5TJ7IA.js";
150
+ } from "../chunk-DBK277JW.js";
151
151
 
152
152
  // source/services/common/Types.ts
153
153
  import * as ls from "vscode-languageserver";
@@ -10020,12 +10020,25 @@ var SemanticTokensServiceA = class {
10020
10020
  node.closeParenthesisToken,
10021
10021
  15 /* TypeParenthesis */
10022
10022
  );
10023
- case "unresolved":
10023
+ case "unresolved": {
10024
+ let callee = node.expression.unwrapParenthesizedExpressions();
10025
+ if (callee.kind === 85 /* GenericSpecializationExpression */) {
10026
+ callee = callee.expression.unwrapParenthesizedExpressions();
10027
+ }
10028
+ let isCapitalizedName;
10029
+ if (callee.kind === 84 /* IdentifierExpression */) {
10030
+ isCapitalizedName = this.isCapitalizedName(analyzer.createNameFromIdentifier(callee.identifier));
10031
+ } else if (callee.kind === 71 /* MemberAccessExpression */) {
10032
+ isCapitalizedName = this.isCapitalizedName(analyzer.createNameFromIdentifier(callee.memberName));
10033
+ } else {
10034
+ isCapitalizedName = false;
10035
+ }
10024
10036
  return this.parentheses(
10025
10037
  node.openParenthesisToken,
10026
10038
  node.closeParenthesisToken,
10027
- 16 /* FunctionParenthesis */
10039
+ isCapitalizedName ? 15 /* TypeParenthesis */ : 16 /* FunctionParenthesis */
10028
10040
  );
10041
+ }
10029
10042
  default:
10030
10043
  Debug.never(meaning);
10031
10044
  }
@@ -12368,7 +12381,7 @@ var ReadonlyCompilationState = class {
12368
12381
  });
12369
12382
  }
12370
12383
  createDiagnosticsCollectionSummary(diagnostics) {
12371
- const hasErrors = diagnostics.some((d) => d.data.kind === 0 /* Error */);
12384
+ const hasErrors = diagnostics.some((d) => d.data.severity === 0 /* Error */);
12372
12385
  return new DiagnosticsCollectionSummary(hasErrors);
12373
12386
  }
12374
12387
  };
@@ -19740,15 +19753,37 @@ var SemanticTokensServiceM = class {
19740
19753
  node.closeParenthesisToken,
19741
19754
  15 /* TypeParenthesis */
19742
19755
  );
19743
- case "unresolved":
19756
+ case "variant-value-access":
19744
19757
  return this.parentheses(
19745
19758
  node.openParenthesisToken,
19746
19759
  node.closeParenthesisToken,
19747
- 16 /* FunctionParenthesis */
19760
+ 15 /* TypeParenthesis */
19748
19761
  );
19749
- case "variant-value-access":
19750
19762
  case "bit-flag-selection":
19751
- return [];
19763
+ return this.parentheses(
19764
+ node.openParenthesisToken,
19765
+ node.closeParenthesisToken,
19766
+ 15 /* TypeParenthesis */
19767
+ );
19768
+ case "unresolved": {
19769
+ let callee = node.expression.unwrapParenthesizedExpressions();
19770
+ if (callee.kind === 1041 /* GenericSpecializationExpression */) {
19771
+ callee = callee.expression.unwrapParenthesizedExpressions();
19772
+ }
19773
+ let isCapitalizedName;
19774
+ if (callee.kind === 1042 /* IdentifierExpression */) {
19775
+ isCapitalizedName = this.isCapitalizedName(analyzer.createNameFromIdentifier(callee.identifier));
19776
+ } else if (callee.kind === 1063 /* MemberAccessExpression */) {
19777
+ isCapitalizedName = this.isCapitalizedName(analyzer.createNameFromIdentifier(callee.memberName));
19778
+ } else {
19779
+ isCapitalizedName = false;
19780
+ }
19781
+ return this.parentheses(
19782
+ node.openParenthesisToken,
19783
+ node.closeParenthesisToken,
19784
+ isCapitalizedName ? 15 /* TypeParenthesis */ : 16 /* FunctionParenthesis */
19785
+ );
19786
+ }
19752
19787
  default:
19753
19788
  Debug.never(meaning);
19754
19789
  }
@@ -21173,7 +21208,7 @@ var _LanguageServer = class _LanguageServer {
21173
21208
  const range = this.convertSourceFileRange(sourceFile, diagnostic.location?.range ?? new Range(0, 0));
21174
21209
  const message = diagnostic.data.message;
21175
21210
  let severity;
21176
- switch (diagnostic.data.kind) {
21211
+ switch (diagnostic.data.severity) {
21177
21212
  case 0 /* Error */:
21178
21213
  severity = ls3.DiagnosticSeverity.Error;
21179
21214
  break;
@@ -21187,14 +21222,14 @@ var _LanguageServer = class _LanguageServer {
21187
21222
  severity = ls3.DiagnosticSeverity.Hint;
21188
21223
  break;
21189
21224
  default:
21190
- Debug.never(diagnostic.data.kind);
21225
+ Debug.never(diagnostic.data.severity);
21191
21226
  }
21192
21227
  let tags;
21193
- if ((diagnostic.data.flags & (1 /* Unused */ | 2 /* Unreachable */)) !== 0) {
21228
+ if ((diagnostic.data.flags & 1 /* Unnecessary */) !== 0) {
21194
21229
  tags ??= [];
21195
21230
  tags.push(ls3.DiagnosticTag.Unnecessary);
21196
21231
  }
21197
- if ((diagnostic.data.flags & 4 /* Deprecated */) !== 0) {
21232
+ if ((diagnostic.data.flags & 2 /* Deprecated */) !== 0) {
21198
21233
  tags ??= [];
21199
21234
  tags.push(ls3.DiagnosticTag.Deprecated);
21200
21235
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Compiler,
3
3
  DiagnosticFormatter
4
- } from "./chunk-VJJPNCJV.js";
4
+ } from "./chunk-XEK6QRUU.js";
5
5
  import {
6
6
  ArtelVersion,
7
7
  Cached,
@@ -16,7 +16,7 @@ import {
16
16
  __async,
17
17
  performanceMeasurementStageNames,
18
18
  performanceMeasurementStages
19
- } from "./chunk-XJ5TJ7IA.js";
19
+ } from "./chunk-DBK277JW.js";
20
20
 
21
21
  // source/executor/FileSystemUri.ts
22
22
  import { platform } from "os";
@@ -230,7 +230,7 @@ var NodeCompiler = class {
230
230
  return __async(this, null, function* () {
231
231
  const standardLibraryUri = yield this.findStandardTypeScriptLibrary(nodeModulesSearchPaths, defaultTsLibraryPath);
232
232
  if (standardLibraryUri === void 0) {
233
- const diagnostic = new Diagnostic(DiagnosticData.withCode(
233
+ const diagnostic = new Diagnostic(DiagnosticData.create(
234
234
  3e3 /* CannotFindTsLibDirectoryBaseSearchPaths0 */,
235
235
  [nodeModulesSearchPaths.map((p) => `'${p}'`).join(", ")]
236
236
  ), void 0);
@@ -357,7 +357,7 @@ var PrintingDiagnosticAcceptor = class {
357
357
  this.formatter = new NodeDiagnosticFormatter(basePath);
358
358
  }
359
359
  addDiagnostic(diagnostic) {
360
- if (diagnostic.data.kind === 0 /* Error */ || diagnostic.data.kind === 1 /* Warning */ && !this.noWarnings) {
360
+ if (diagnostic.data.severity === 0 /* Error */ || diagnostic.data.severity === 1 /* Warning */ && !this.noWarnings) {
361
361
  const diagnosticText = this.formatter.format(diagnostic);
362
362
  console.log(diagnosticText);
363
363
  }
@@ -540,14 +540,14 @@ var ArgumentsParser = class {
540
540
  index++;
541
541
  } else {
542
542
  diagnostics.addDiagnostic(new Diagnostic(
543
- DiagnosticData.withCode(3016 /* ExpectedOutputDirectoryPath */),
543
+ DiagnosticData.create(3016 /* ExpectedOutputDirectoryPath */),
544
544
  void 0
545
545
  ));
546
546
  result.hasErrors = true;
547
547
  }
548
548
  } else {
549
549
  diagnostics.addDiagnostic(new Diagnostic(
550
- DiagnosticData.withCode(3015 /* ExpectedProjectDirectoryPath */),
550
+ DiagnosticData.create(3015 /* ExpectedProjectDirectoryPath */),
551
551
  void 0
552
552
  ));
553
553
  result.hasErrors = true;
@@ -561,7 +561,7 @@ var ArgumentsParser = class {
561
561
  Debug.never(result.command);
562
562
  }
563
563
  } else {
564
- diagnostics.addDiagnostic(new Diagnostic(DiagnosticData.withCode(
564
+ diagnostics.addDiagnostic(new Diagnostic(DiagnosticData.create(
565
565
  3013 /* UnknownCompilerCommand0 */,
566
566
  [commandText]
567
567
  ), void 0));
@@ -569,7 +569,7 @@ var ArgumentsParser = class {
569
569
  }
570
570
  } else {
571
571
  diagnostics.addDiagnostic(new Diagnostic(
572
- DiagnosticData.withCode(3012 /* ExpectedCompilerCommand */),
572
+ DiagnosticData.create(3012 /* ExpectedCompilerCommand */),
573
573
  void 0
574
574
  ));
575
575
  result.hasErrors = true;
@@ -665,7 +665,7 @@ var ArgumentsParser = class {
665
665
  }
666
666
  default: {
667
667
  diagnostics.addDiagnostic(new Diagnostic(
668
- DiagnosticData.withCode(3014 /* UnknownCommandLineArgument0 */, [argumentName]),
668
+ DiagnosticData.create(3014 /* UnknownCommandLineArgument0 */, [argumentName]),
669
669
  void 0
670
670
  ));
671
671
  result.hasErrors = true;
@@ -678,7 +678,7 @@ var ArgumentsParser = class {
678
678
  const result = this.tryParseStringArgument(index, args);
679
679
  if (result === void 0) {
680
680
  diagnostics.addDiagnostic(new Diagnostic(
681
- DiagnosticData.withCode(3017 /* ExpectedTextValueForArgument0 */, [name]),
681
+ DiagnosticData.create(3017 /* ExpectedTextValueForArgument0 */, [name]),
682
682
  void 0
683
683
  ));
684
684
  parsedArguments.hasErrors = true;