@abaplint/cli 2.113.111 → 2.113.113

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.
Files changed (2) hide show
  1. package/build/cli.js +45 -32
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -269,7 +269,7 @@ class ApplyFixes {
269
269
  }
270
270
  }
271
271
  */
272
- const changed = (0, core_1.applyEditList)(reg, edits);
272
+ const changed = core_1.Edits.applyEditList(reg, edits);
273
273
  for (const filename of changed) {
274
274
  this.changedFiles.add(filename);
275
275
  }
@@ -43065,7 +43065,7 @@ exports.MemoryFile = MemoryFile;
43065
43065
  "use strict";
43066
43066
 
43067
43067
  Object.defineProperty(exports, "__esModule", ({ value: true }));
43068
- exports.Rename = exports.PrettyPrinter = exports.Position = exports.CurrentScope = exports.ABAPFile = exports.RulesRunner = exports.SpaghettiScope = exports.SyntaxLogic = exports.ABAPObject = exports.Tokens = exports.ExpressionsCDS = exports.CDSParser = exports.LanguageServerTypes = exports.DDLParser = exports.NativeSQL = exports.MacroContent = exports.MacroCall = exports.applyEditList = exports.applyEditSingle = exports.SpaghettiScopeNode = exports.AbstractFile = exports.Token = exports.ScopeType = exports.BasicTypes = exports.TypedIdentifier = exports.AbstractType = exports.VirtualPosition = exports.Comment = exports.Unknown = exports.Empty = exports.Identifier = exports.Nodes = exports.Types = exports.Expressions = exports.Statements = exports.Structures = exports.SkipLogic = exports.Objects = exports.ArtifactsRules = exports.ArtifactsObjects = exports.ArtifactsABAP = exports.BuiltIn = exports.MethodLengthStats = exports.LanguageServer = exports.Registry = exports.CyclomaticComplexityStats = exports.Version = exports.Config = exports.Issue = exports.MemoryFile = void 0;
43068
+ exports.Rename = exports.PrettyPrinter = exports.Position = exports.CurrentScope = exports.RulesRunner = exports.SpaghettiScope = exports.SyntaxLogic = exports.ABAPObject = exports.Tokens = exports.ExpressionsCDS = exports.CDSParser = exports.LanguageServerTypes = exports.DDLParser = exports.AbstractFile = exports.ABAPFile = exports.MemoryFile = exports.Edits = exports.ReferenceType = exports.NativeSQL = exports.MacroContent = exports.MacroCall = exports.SpaghettiScopeNode = exports.Token = exports.ScopeType = exports.BasicTypes = exports.TypedIdentifier = exports.AbstractType = exports.VirtualPosition = exports.Comment = exports.Unknown = exports.Empty = exports.Identifier = exports.Nodes = exports.Types = exports.Expressions = exports.Statements = exports.Structures = exports.SkipLogic = exports.Objects = exports.ArtifactsRules = exports.ArtifactsObjects = exports.ArtifactsABAP = exports.BuiltIn = exports.MethodLengthStats = exports.LanguageServer = exports.Registry = exports.CyclomaticComplexityStats = exports.Version = exports.Config = exports.Issue = void 0;
43069
43069
  exports.LSPEdit = exports.RuleTag = exports.Severity = exports.Visibility = exports.Info = exports.Diagnostics = void 0;
43070
43070
  const issue_1 = __webpack_require__(/*! ./issue */ "./node_modules/@abaplint/core/build/src/issue.js");
43071
43071
  Object.defineProperty(exports, "Issue", ({ enumerable: true, get: function () { return issue_1.Issue; } }));
@@ -43138,8 +43138,6 @@ Object.defineProperty(exports, "MacroCall", ({ enumerable: true, get: function (
43138
43138
  Object.defineProperty(exports, "MacroContent", ({ enumerable: true, get: function () { return _statement_1.MacroContent; } }));
43139
43139
  Object.defineProperty(exports, "NativeSQL", ({ enumerable: true, get: function () { return _statement_1.NativeSQL; } }));
43140
43140
  const edit_helper_1 = __webpack_require__(/*! ./edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
43141
- Object.defineProperty(exports, "applyEditSingle", ({ enumerable: true, get: function () { return edit_helper_1.applyEditSingle; } }));
43142
- Object.defineProperty(exports, "applyEditList", ({ enumerable: true, get: function () { return edit_helper_1.applyEditList; } }));
43143
43141
  const _builtin_1 = __webpack_require__(/*! ./abap/5_syntax/_builtin */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js");
43144
43142
  Object.defineProperty(exports, "BuiltIn", ({ enumerable: true, get: function () { return _builtin_1.BuiltIn; } }));
43145
43143
  const abap_file_1 = __webpack_require__(/*! ./abap/abap_file */ "./node_modules/@abaplint/core/build/src/abap/abap_file.js");
@@ -43172,6 +43170,15 @@ const diagnostics_1 = __webpack_require__(/*! ./lsp/diagnostics */ "./node_modul
43172
43170
  Object.defineProperty(exports, "Diagnostics", ({ enumerable: true, get: function () { return diagnostics_1.Diagnostics; } }));
43173
43171
  const _edit_1 = __webpack_require__(/*! ./lsp/_edit */ "./node_modules/@abaplint/core/build/src/lsp/_edit.js");
43174
43172
  Object.defineProperty(exports, "LSPEdit", ({ enumerable: true, get: function () { return _edit_1.LSPEdit; } }));
43173
+ const _reference_1 = __webpack_require__(/*! ./abap/5_syntax/_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
43174
+ Object.defineProperty(exports, "ReferenceType", ({ enumerable: true, get: function () { return _reference_1.ReferenceType; } }));
43175
+ // do not include this file from anywhere within abaplint
43176
+ // https://github.com/abaplint/abaplint/issues/873
43177
+ const Edits = {
43178
+ applyEditSingle: edit_helper_1.applyEditSingle,
43179
+ applyEditList: edit_helper_1.applyEditList,
43180
+ };
43181
+ exports.Edits = Edits;
43175
43182
  //# sourceMappingURL=index.js.map
43176
43183
 
43177
43184
  /***/ }),
@@ -53918,7 +53925,7 @@ class Registry {
53918
53925
  }
53919
53926
  static abaplintVersion() {
53920
53927
  // magic, see build script "version.sh"
53921
- return "2.113.111";
53928
+ return "2.113.113";
53922
53929
  }
53923
53930
  getDDICReferences() {
53924
53931
  return this.ddicReferences;
@@ -54677,7 +54684,7 @@ const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@ab
54677
54684
  const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
54678
54685
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
54679
54686
  const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
54680
- const __1 = __webpack_require__(/*! .. */ "./node_modules/@abaplint/core/build/src/index.js");
54687
+ const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
54681
54688
  const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
54682
54689
  class AlignParametersConf extends _basic_rule_config_1.BasicRuleConfig {
54683
54690
  }
@@ -54885,9 +54892,9 @@ DATA(sdf) = VALUE type(
54885
54892
  }
54886
54893
  raiseAndCreateCandidates(stru) {
54887
54894
  const candidates = [];
54888
- const statements = stru.findAllStatements(__1.Statements.Raise);
54889
- statements.push(...stru.findAllStatements(__1.Statements.CreateObject));
54890
- statements.push(...stru.findAllStatements(__1.Statements.RaiseEvent));
54895
+ const statements = stru.findAllStatements(Statements.Raise);
54896
+ statements.push(...stru.findAllStatements(Statements.CreateObject));
54897
+ statements.push(...stru.findAllStatements(Statements.RaiseEvent));
54891
54898
  for (const raise of statements) {
54892
54899
  const parameters = [];
54893
54900
  const param = raise.findDirectExpression(Expressions.ParameterListS);
@@ -57825,7 +57832,8 @@ exports.ConstantClasses = exports.ConstantClassesConf = void 0;
57825
57832
  const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
57826
57833
  const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
57827
57834
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
57828
- const __1 = __webpack_require__(/*! .. */ "./node_modules/@abaplint/core/build/src/index.js");
57835
+ const Objects = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
57836
+ const visibility_1 = __webpack_require__(/*! ../abap/4_file_information/visibility */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js");
57829
57837
  /** Checks that constants classes are in sync with domain fixed values */
57830
57838
  class ConstantClassesConf extends _basic_rule_config_1.BasicRuleConfig {
57831
57839
  constructor() {
@@ -57861,7 +57869,7 @@ class ConstantClasses {
57861
57869
  run(obj) {
57862
57870
  if (this.conf
57863
57871
  && this.conf.mapping
57864
- && obj instanceof __1.Objects.Domain) {
57872
+ && obj instanceof Objects.Domain) {
57865
57873
  const configEntry = this.conf.mapping.find(x => x.domain.toUpperCase() === obj.getName().toUpperCase());
57866
57874
  if (!configEntry) {
57867
57875
  return [];
@@ -57905,7 +57913,7 @@ class ConstantClasses {
57905
57913
  issues.push(this.issueAtConstant(constant, `Use exact type ${configEntry.domain} instead of ${constant.typeName}`));
57906
57914
  // quickfix will change the type
57907
57915
  }
57908
- if (constant.visibility !== __1.Visibility.Public) {
57916
+ if (constant.visibility !== visibility_1.Visibility.Public) {
57909
57917
  issues.push(this.issueAtConstant(constant, `Constant ${constant.name} should be public`));
57910
57918
  // quickfix will move constant
57911
57919
  }
@@ -63441,8 +63449,8 @@ exports.FullyTypeITabs = FullyTypeITabs;
63441
63449
 
63442
63450
  Object.defineProperty(exports, "__esModule", ({ value: true }));
63443
63451
  exports.FunctionModuleRecommendations = exports.FunctionModuleRecommendationsConf = void 0;
63444
- const __1 = __webpack_require__(/*! .. */ "./node_modules/@abaplint/core/build/src/index.js");
63445
63452
  const expressions_1 = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
63453
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
63446
63454
  const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
63447
63455
  const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
63448
63456
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
@@ -63525,7 +63533,7 @@ class FunctionModuleRecommendations extends _abap_rule_1.ABAPRule {
63525
63533
  funcName = funcName.slice(1, funcName.length - 1);
63526
63534
  const index = this.conf.recommendations.findIndex(i => i.name.toUpperCase() === funcName && (i.from === undefined || configVersion >= i.from));
63527
63535
  if (index >= 0) {
63528
- issues.push(__1.Issue.atToken(file, token, this.getMessage(index), this.getMetadata().key, this.conf.severity));
63536
+ issues.push(issue_1.Issue.atToken(file, token, this.getMessage(index), this.getMetadata().key, this.conf.severity));
63529
63537
  }
63530
63538
  }
63531
63539
  return issues;
@@ -67480,8 +67488,8 @@ exports.MethodLength = MethodLength;
67480
67488
 
67481
67489
  Object.defineProperty(exports, "__esModule", ({ value: true }));
67482
67490
  exports.MethodOverwritesBuiltIn = exports.MethodOverwritesBuiltInConf = void 0;
67483
- const __1 = __webpack_require__(/*! .. */ "./node_modules/@abaplint/core/build/src/index.js");
67484
67491
  const _builtin_1 = __webpack_require__(/*! ../abap/5_syntax/_builtin */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js");
67492
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
67485
67493
  const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
67486
67494
  const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
67487
67495
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
@@ -67531,7 +67539,7 @@ ENDCLASS.`,
67531
67539
  for (const method of methods) {
67532
67540
  if (builtIn.searchBuiltin(method.name.toUpperCase())) {
67533
67541
  const message = `Method name "${method.name}" overwrites built-in SAP function name`;
67534
- issues.push(__1.Issue.atIdentifier(method.identifier, message, this.getMetadata().key));
67542
+ issues.push(issue_1.Issue.atIdentifier(method.identifier, message, this.getMetadata().key));
67535
67543
  }
67536
67544
  }
67537
67545
  return issues;
@@ -70926,7 +70934,8 @@ const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@ab
70926
70934
  const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
70927
70935
  const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
70928
70936
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
70929
- const __1 = __webpack_require__(/*! .. */ "./node_modules/@abaplint/core/build/src/index.js");
70937
+ const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplint/core/build/src/version.js");
70938
+ const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
70930
70939
  class PreferRaiseExceptionNewConf extends _basic_rule_config_1.BasicRuleConfig {
70931
70940
  }
70932
70941
  exports.PreferRaiseExceptionNewConf = PreferRaiseExceptionNewConf;
@@ -70958,12 +70967,12 @@ From 752 and up`,
70958
70967
  this.conf = conf;
70959
70968
  }
70960
70969
  runParsed(file) {
70961
- if (this.reg.getConfig().getVersion() < __1.Version.v752) {
70970
+ if (this.reg.getConfig().getVersion() < version_1.Version.v752) {
70962
70971
  return [];
70963
70972
  }
70964
70973
  const issues = [];
70965
70974
  for (const statement of file.getStatements()) {
70966
- if (statement.get() instanceof __1.Statements.Raise) {
70975
+ if (statement.get() instanceof Statements.Raise) {
70967
70976
  const concat = statement.concatTokens().toUpperCase();
70968
70977
  if (concat.includes(" MESSAGE")) {
70969
70978
  continue;
@@ -72142,11 +72151,15 @@ exports.SelectPerformance = SelectPerformance;
72142
72151
 
72143
72152
  Object.defineProperty(exports, "__esModule", ({ value: true }));
72144
72153
  exports.SelectSingleFullKey = exports.SelectSingleFullKeyConf = void 0;
72145
- const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
72154
+ const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
72146
72155
  const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
72147
- const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
72148
- const __1 = __webpack_require__(/*! .. */ "./node_modules/@abaplint/core/build/src/index.js");
72149
72156
  const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
72157
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
72158
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
72159
+ const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
72160
+ const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
72161
+ const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
72162
+ const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
72150
72163
  class SelectSingleFullKeyConf extends _basic_rule_config_1.BasicRuleConfig {
72151
72164
  constructor() {
72152
72165
  super(...arguments);
@@ -72196,10 +72209,10 @@ If the statement contains a JOIN it is not checked`,
72196
72209
  }
72197
72210
  run(obj) {
72198
72211
  var _a, _b;
72199
- if (!(obj instanceof __1.ABAPObject)) {
72212
+ if (!(obj instanceof _abap_object_1.ABAPObject)) {
72200
72213
  return [];
72201
72214
  }
72202
- const syntax = new __1.SyntaxLogic(this.reg, obj).run();
72215
+ const syntax = new syntax_1.SyntaxLogic(this.reg, obj).run();
72203
72216
  if (syntax.issues.length > 0) {
72204
72217
  return [];
72205
72218
  }
@@ -72209,21 +72222,21 @@ If the statement contains a JOIN it is not checked`,
72209
72222
  const statements = file.getStatements();
72210
72223
  for (let i = 0; i < statements.length; i++) {
72211
72224
  const s = statements[i];
72212
- if (!(s.get() instanceof __1.Statements.Select)) {
72225
+ if (!(s.get() instanceof Statements.Select)) {
72213
72226
  continue;
72214
72227
  }
72215
- else if (s.findFirstExpression(__1.Expressions.SQLJoin)) {
72228
+ else if (s.findFirstExpression(Expressions.SQLJoin)) {
72216
72229
  continue;
72217
72230
  }
72218
72231
  else if (s.findTokenSequencePosition("SELECT", "SINGLE") === undefined) {
72219
72232
  continue;
72220
72233
  }
72221
- const databaseTable = s.findFirstExpression(__1.Expressions.DatabaseTable);
72234
+ const databaseTable = s.findFirstExpression(Expressions.DatabaseTable);
72222
72235
  if (databaseTable === undefined) {
72223
72236
  continue;
72224
72237
  }
72225
72238
  const next = statements[i + 1];
72226
- if ((next === null || next === void 0 ? void 0 : next.get()) instanceof __1.Comment
72239
+ if ((next === null || next === void 0 ? void 0 : next.get()) instanceof _statement_1.Comment
72227
72240
  && next.concatTokens().includes(this.getMetadata().pseudoComment + "")) {
72228
72241
  if (this.getConfig().allowPseudo !== true) {
72229
72242
  issues.push(issue_1.Issue.atStatement(file, s, "Pseudo comment not allowed", this.getMetadata().key, this.getConfig().severity));
@@ -72236,7 +72249,7 @@ If the statement contains a JOIN it is not checked`,
72236
72249
  continue;
72237
72250
  }
72238
72251
  const keys = table.listKeys(this.reg);
72239
- const cond = s.findFirstExpression(__1.Expressions.SQLCond);
72252
+ const cond = s.findFirstExpression(Expressions.SQLCond);
72240
72253
  const set = new Set();
72241
72254
  for (const key of keys) {
72242
72255
  if (key === "MANDT") {
@@ -72245,10 +72258,10 @@ If the statement contains a JOIN it is not checked`,
72245
72258
  }
72246
72259
  set.add(key);
72247
72260
  }
72248
- for (const compare of (cond === null || cond === void 0 ? void 0 : cond.findAllExpressionsRecursive(__1.Expressions.SQLCompare)) || []) {
72261
+ for (const compare of (cond === null || cond === void 0 ? void 0 : cond.findAllExpressionsRecursive(Expressions.SQLCompare)) || []) {
72249
72262
  if (compare.getChildren().length === 3) {
72250
- const fname = (_a = compare.findDirectExpression(__1.Expressions.SQLFieldName)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
72251
- const operator = (_b = compare.findDirectExpression(__1.Expressions.SQLCompareOperator)) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase();
72263
+ const fname = (_a = compare.findDirectExpression(Expressions.SQLFieldName)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
72264
+ const operator = (_b = compare.findDirectExpression(Expressions.SQLCompareOperator)) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase();
72252
72265
  if (fname && (operator === "=" || operator === "EQ")) {
72253
72266
  set.delete(fname);
72254
72267
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.111",
3
+ "version": "2.113.113",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.113.111",
41
+ "@abaplint/core": "^2.113.113",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",