@artel/artc 0.6.25295 → 0.6.25296

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-Q6RADCFY.js";
5
- import "./chunk-MODTG45P.js";
4
+ } from "./chunk-ZTJ2IUQN.js";
5
+ import "./chunk-CLTCG3EC.js";
6
6
  import {
7
7
  __async
8
- } from "./chunk-YD2DEVJP.js";
8
+ } from "./chunk-MPZ5LBXG.js";
9
9
 
10
10
  // source/Cli.ts
11
11
  function main() {
package/build/api/Api.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Compiler
3
- } from "../chunk-MODTG45P.js";
3
+ } from "../chunk-CLTCG3EC.js";
4
4
  import {
5
5
  AccessKind,
6
6
  AccessedFunctionParameter,
@@ -347,7 +347,7 @@ import {
347
347
  withoutQuotes,
348
348
  withoutTemplateQuotes,
349
349
  yieldTask
350
- } from "../chunk-YD2DEVJP.js";
350
+ } from "../chunk-MPZ5LBXG.js";
351
351
  export {
352
352
  AccessKind,
353
353
  AccessedFunctionParameter,
@@ -6,9 +6,9 @@ import {
6
6
  PhysicalFileSystem,
7
7
  PhysicalTypeScriptLibrariesProvider,
8
8
  PrintingDiagnosticAcceptor
9
- } from "../chunk-Q6RADCFY.js";
10
- import "../chunk-MODTG45P.js";
11
- import "../chunk-YD2DEVJP.js";
9
+ } from "../chunk-ZTJ2IUQN.js";
10
+ import "../chunk-CLTCG3EC.js";
11
+ import "../chunk-MPZ5LBXG.js";
12
12
  export {
13
13
  CommandLineCompiler,
14
14
  FileSystemUri,
@@ -183,7 +183,7 @@ import {
183
183
  unwrapParenthesizedExpressions,
184
184
  visitChildren,
185
185
  yieldTask
186
- } from "../chunk-YD2DEVJP.js";
186
+ } from "../chunk-MPZ5LBXG.js";
187
187
 
188
188
  // source/services/CustomRequests.ts
189
189
  import * as ls from "vscode-languageserver";
@@ -9542,7 +9542,9 @@ var CompilationController = class extends SxObject2 {
9542
9542
  });
9543
9543
  }
9544
9544
  dispose() {
9545
- Query.from(this.configurationControllerByPackageUri_.values()).map((c) => c.dispose());
9545
+ for (const controller of this.configurationControllerByPackageUri_.values()) {
9546
+ controller.dispose();
9547
+ }
9546
9548
  disposeSignallingObject2(this);
9547
9549
  }
9548
9550
  reloadMainCompilation() {
@@ -13264,7 +13266,9 @@ var _LanguageServer = class _LanguageServer {
13264
13266
  this.connection.listen();
13265
13267
  }
13266
13268
  dispose() {
13267
- this.disposables.forEach((d) => d.dispose());
13269
+ this.disposables.forEach((d) => {
13270
+ d.dispose();
13271
+ });
13268
13272
  this.workspace.dispose();
13269
13273
  this.connection.dispose();
13270
13274
  }
@@ -10,7 +10,7 @@ import {
10
10
  WellKnownDeclarationsLoadError,
11
11
  __async,
12
12
  createTsInteropInputsForCompilation
13
- } from "./chunk-YD2DEVJP.js";
13
+ } from "./chunk-MPZ5LBXG.js";
14
14
 
15
15
  // source/executor/Compiler.ts
16
16
  var Compiler = class {
@@ -764,7 +764,7 @@ var UniqueWithComparatorQuery = class extends Query {
764
764
  };
765
765
 
766
766
  // source/common/Constants.ts
767
- var ArtelVersion = true ? "0.6.25295" : "";
767
+ var ArtelVersion = true ? "0.6.25296" : "";
768
768
  var ArtelSourceFileExtensions = [".\u0430\u0440\u0442", ".\u0430\u0440\u0442\u0435\u043B\u044C", ".art", ".artel", ".\u0430\u0440\u0442\u043C", ".\u0430\u0440\u0442\u0435\u043B\u044C\u043C", ".artm", ".artelm"];
769
769
  var ArtelSourceFileExtensionSet = new Set(ArtelSourceFileExtensions);
770
770
  var ArtelSourceAndConfigurationFileExtensionSet = new Set(ArtelSourceFileExtensionSet).add(".json");
@@ -13378,6 +13378,7 @@ var DiagnosticCode = /* @__PURE__ */ ((DiagnosticCode2) => {
13378
13378
  DiagnosticCode2[DiagnosticCode2["PlainObjectFieldsMustBeConstant"] = 2218] = "PlainObjectFieldsMustBeConstant";
13379
13379
  DiagnosticCode2[DiagnosticCode2["PlainObjectFieldsMustBeConstantAutomaticallyCreatedStoredFieldIsNotConstant"] = 2219] = "PlainObjectFieldsMustBeConstantAutomaticallyCreatedStoredFieldIsNotConstant";
13380
13380
  DiagnosticCode2[DiagnosticCode2["FieldTypeCausesRecursivePlainObjectLayout"] = 2220] = "FieldTypeCausesRecursivePlainObjectLayout";
13381
+ DiagnosticCode2[DiagnosticCode2["QuestionOperatorCanBeUsedOnlyInSpecificExpressions"] = 2221] = "QuestionOperatorCanBeUsedOnlyInSpecificExpressions";
13381
13382
  DiagnosticCode2[DiagnosticCode2["CannotFindTsLibDirectoryBaseSearchPaths0"] = 3e3] = "CannotFindTsLibDirectoryBaseSearchPaths0";
13382
13383
  DiagnosticCode2[DiagnosticCode2["SourceFile0IsNotPartOfThePackageAndWontBeLoaded"] = 3001] = "SourceFile0IsNotPartOfThePackageAndWontBeLoaded";
13383
13384
  DiagnosticCode2[DiagnosticCode2["ProgramWithoutMainPackageCannotBeCompiled"] = 3002] = "ProgramWithoutMainPackageCannotBeCompiled";
@@ -13702,6 +13703,7 @@ var englishErrorMessages = {
13702
13703
  [2218 /* PlainObjectFieldsMustBeConstant */]: "Plain object fields must be constant.",
13703
13704
  [2219 /* PlainObjectFieldsMustBeConstantAutomaticallyCreatedStoredFieldIsNotConstant */]: "Plain object fields must be constant. Automatically created stored field is not constant.",
13704
13705
  [2220 /* FieldTypeCausesRecursivePlainObjectLayout */]: "Field type causes recursive plain object layout.",
13706
+ [2221 /* QuestionOperatorCanBeUsedOnlyInSpecificExpressions */]: "Question operator can be used only in member access, indexed access, dereference or call expressions.",
13705
13707
  [3e3 /* CannotFindTsLibDirectoryBaseSearchPaths0 */]: "Can not find directory with TypeScript library. Base search paths: {0}.",
13706
13708
  [3001 /* SourceFile0IsNotPartOfThePackageAndWontBeLoaded */]: "Source file '{0}' is not part of the package and won't be loaded.",
13707
13709
  [3002 /* ProgramWithoutMainPackageCannotBeCompiled */]: "Program without main package cannot be compiled.",
@@ -13980,6 +13982,7 @@ var russianErrorMessages = {
13980
13982
  [2218 /* PlainObjectFieldsMustBeConstant */]: "\u041F\u043E\u043B\u044F \u043F\u0440\u043E\u0441\u0442\u043E\u0433\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u0430 \u0434\u043E\u043B\u0436\u043D\u044B \u0431\u044B\u0442\u044C \u043A\u043E\u043D\u0441\u0442\u0430\u043D\u0442\u043D\u044B\u043C\u0438.",
13981
13983
  [2219 /* PlainObjectFieldsMustBeConstantAutomaticallyCreatedStoredFieldIsNotConstant */]: "\u041F\u043E\u043B\u044F \u043F\u0440\u043E\u0441\u0442\u043E\u0433\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u0430 \u0434\u043E\u043B\u0436\u043D\u044B \u0431\u044B\u0442\u044C \u043A\u043E\u043D\u0441\u0442\u0430\u043D\u0442\u043D\u044B\u043C\u0438. \u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0441\u043E\u0437\u0434\u0430\u043D\u043D\u043E\u0435 \u0445\u0440\u0430\u043D\u0438\u043C\u043E\u0435 \u043F\u043E\u043B\u0435 \u043D\u0435 \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043A\u043E\u043D\u0441\u0442\u0430\u043D\u0442\u043D\u044B\u043C.",
13982
13984
  [2220 /* FieldTypeCausesRecursivePlainObjectLayout */]: "\u0422\u0438\u043F \u043F\u043E\u043B\u044F \u043F\u0440\u0438\u0432\u043E\u0434\u0438\u0442 \u043A \u0440\u0435\u043A\u0443\u0440\u0441\u0438\u0432\u043D\u043E\u0439 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435 \u043F\u0440\u043E\u0441\u0442\u043E\u0433\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u0430.",
13985
+ [2221 /* QuestionOperatorCanBeUsedOnlyInSpecificExpressions */]: "\u041E\u043F\u0435\u0440\u0430\u0442\u043E\u0440 '?' \u043C\u043E\u0436\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u044F\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043F\u043E \u0438\u043C\u0435\u043D\u0438, \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043F\u043E \u0438\u043D\u0434\u0435\u043A\u0441\u0443, \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043F\u043E \u0441\u0441\u044B\u043B\u043A\u0435 \u0438 \u0432\u044B\u0437\u043E\u0432\u0430.",
13983
13986
  [3e3 /* CannotFindTsLibDirectoryBaseSearchPaths0 */]: "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043D\u0430\u0439\u0442\u0438 \u043F\u0430\u043F\u043A\u0443 \u0441\u043E \u0441\u0442\u0430\u043D\u0434\u0430\u0440\u0442\u043D\u043E\u0439 \u0431\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u043E\u0439 TypeScript. \u041F\u0443\u0442\u0438, \u043E\u0442\u043D\u043E\u0441\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u043E\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043B\u044F\u043B\u0441\u044F \u043F\u043E\u0438\u0441\u043A: {0}.",
13984
13987
  [3001 /* SourceFile0IsNotPartOfThePackageAndWontBeLoaded */]: "\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0444\u0430\u0439\u043B '{0}' \u043D\u0435 \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0447\u0430\u0441\u0442\u044C\u044E \u043F\u0430\u043A\u0435\u0442\u0430 \u0438 \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D.",
13985
13988
  [3002 /* ProgramWithoutMainPackageCannotBeCompiled */]: "\u041F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u0430 \u0431\u0435\u0437 \u0433\u043B\u0430\u0432\u043D\u043E\u0433\u043E \u043F\u0430\u043A\u0435\u0442\u0430 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0441\u043A\u043E\u043C\u043F\u0438\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0430.",
@@ -50023,9 +50026,28 @@ var SourceFileAnalyzer = class {
50023
50026
  this.analyzer.resolveOwnConstructorCallExpression(node);
50024
50027
  break;
50025
50028
  }
50029
+ case 64 /* AssumptionExpression */: {
50030
+ this.checkAssumptionExpression(node);
50031
+ break;
50032
+ }
50026
50033
  }
50027
50034
  return void 0;
50028
50035
  }
50036
+ checkAssumptionExpression(node) {
50037
+ const parent = getParentSkippingParenthesizedExpressions(node);
50038
+ switch (parent.kind) {
50039
+ case 78 /* MemberAccessExpression */:
50040
+ case 70 /* CallExpression */:
50041
+ case 72 /* IndexedAccessExpression */:
50042
+ case 80 /* DereferenceExpression */:
50043
+ break;
50044
+ default:
50045
+ this.addDiagnostic(this.analyzer.createDiagnostic(
50046
+ 2221 /* QuestionOperatorCanBeUsedOnlyInSpecificExpressions */,
50047
+ node.questionToken
50048
+ ));
50049
+ }
50050
+ }
50029
50051
  checkStatementBlock(node) {
50030
50052
  const semanticContext = this.analyzer.semanticContext.ofStatementBlock(node);
50031
50053
  semanticContext.validateNameConflicts(this.diagnosticAcceptor);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Compiler
3
- } from "./chunk-MODTG45P.js";
3
+ } from "./chunk-CLTCG3EC.js";
4
4
  import {
5
5
  ArtelVersion,
6
6
  Cached,
@@ -15,7 +15,7 @@ import {
15
15
  __async,
16
16
  performanceMeasurementStageNames,
17
17
  performanceMeasurementStages
18
- } from "./chunk-YD2DEVJP.js";
18
+ } from "./chunk-MPZ5LBXG.js";
19
19
 
20
20
  // source/executor/FileSystemUri.ts
21
21
  import { platform } from "os";
@@ -20,6 +20,7 @@ export declare class SourceFileAnalyzer {
20
20
  constructor(analyzer: Analyzer, sourceFile: project.SourceFile);
21
21
  analyze(taskController: TaskController): Promise<Diagnostic[]>;
22
22
  private analyzeNode;
23
+ private checkAssumptionExpression;
23
24
  private checkStatementBlock;
24
25
  private checkFunctionBlock;
25
26
  private checkPackageStructuredTypeDeclaration;
@@ -257,6 +257,7 @@ export declare enum DiagnosticCode {
257
257
  PlainObjectFieldsMustBeConstant = 2218,
258
258
  PlainObjectFieldsMustBeConstantAutomaticallyCreatedStoredFieldIsNotConstant = 2219,
259
259
  FieldTypeCausesRecursivePlainObjectLayout = 2220,
260
+ QuestionOperatorCanBeUsedOnlyInSpecificExpressions = 2221,
260
261
  CannotFindTsLibDirectoryBaseSearchPaths0 = 3000,
261
262
  SourceFile0IsNotPartOfThePackageAndWontBeLoaded = 3001,
262
263
  ProgramWithoutMainPackageCannotBeCompiled = 3002,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artel/artc",
3
- "version": "0.6.25295",
3
+ "version": "0.6.25296",
4
4
  "description": "Артель Компилятор | Artel Compiler",
5
5
  "author": "Nezaboodka Team <contact@nezaboodka.com>",
6
6
  "license": "LGPL-3.0-or-later",