@abaplint/cli 2.101.9 → 2.101.11

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 +57 -44
  2. package/package.json +4 -4
package/build/cli.js CHANGED
@@ -17109,8 +17109,8 @@ class StructureParser {
17109
17109
  return { issues: [], node: parent };
17110
17110
  }
17111
17111
  }
17112
- StructureParser.singletons = {};
17113
17112
  exports.StructureParser = StructureParser;
17113
+ StructureParser.singletons = {};
17114
17114
  //# sourceMappingURL=structure_parser.js.map
17115
17115
 
17116
17116
  /***/ }),
@@ -18748,26 +18748,26 @@ var AttributeLevel;
18748
18748
  AttributeLevel["Instance"] = "instance";
18749
18749
  AttributeLevel["Static"] = "static";
18750
18750
  AttributeLevel["Constant"] = "constant";
18751
- })(AttributeLevel = exports.AttributeLevel || (exports.AttributeLevel = {}));
18751
+ })(AttributeLevel || (exports.AttributeLevel = AttributeLevel = {}));
18752
18752
  var MethodParameterDirection;
18753
18753
  (function (MethodParameterDirection) {
18754
18754
  MethodParameterDirection["Importing"] = "importing";
18755
18755
  MethodParameterDirection["Exporting"] = "exporting";
18756
18756
  MethodParameterDirection["Changing"] = "changing";
18757
18757
  MethodParameterDirection["Returning"] = "returning";
18758
- })(MethodParameterDirection = exports.MethodParameterDirection || (exports.MethodParameterDirection = {}));
18758
+ })(MethodParameterDirection || (exports.MethodParameterDirection = MethodParameterDirection = {}));
18759
18759
  var Duration;
18760
18760
  (function (Duration) {
18761
18761
  Duration["short"] = "SHORT";
18762
18762
  Duration["medium"] = "MEDIUM";
18763
18763
  Duration["long"] = "LONG";
18764
- })(Duration = exports.Duration || (exports.Duration = {}));
18764
+ })(Duration || (exports.Duration = Duration = {}));
18765
18765
  var RiskLevel;
18766
18766
  (function (RiskLevel) {
18767
18767
  RiskLevel["harmless"] = "HARMLESS";
18768
18768
  RiskLevel["critical"] = "CRITICAL";
18769
18769
  RiskLevel["dangerous"] = "DANGEROUS";
18770
- })(RiskLevel = exports.RiskLevel || (exports.RiskLevel = {}));
18770
+ })(RiskLevel || (exports.RiskLevel = RiskLevel = {}));
18771
18771
  //# sourceMappingURL=_abap_file_information.js.map
18772
18772
 
18773
18773
  /***/ }),
@@ -19218,7 +19218,7 @@ var Visibility;
19218
19218
  Visibility[Visibility["Private"] = 1] = "Private";
19219
19219
  Visibility[Visibility["Protected"] = 2] = "Protected";
19220
19220
  Visibility[Visibility["Public"] = 3] = "Public";
19221
- })(Visibility = exports.Visibility || (exports.Visibility = {}));
19221
+ })(Visibility || (exports.Visibility = Visibility = {}));
19222
19222
  //# sourceMappingURL=visibility.js.map
19223
19223
 
19224
19224
  /***/ }),
@@ -19586,6 +19586,7 @@ class BuiltIn {
19586
19586
  return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(name), ["built-in" /* IdentifierMeta.BuiltIn */]);
19587
19587
  }
19588
19588
  }
19589
+ exports.BuiltIn = BuiltIn;
19589
19590
  BuiltIn.filename = "_builtin.prog.abap";
19590
19591
  // todo: "pcre" vs "regex", only one of these parameters are allowed
19591
19592
  // todo: "pcre", only possible from 755
@@ -20409,7 +20410,6 @@ BuiltIn.methods = [
20409
20410
  return: new basic_1.IntegerType(),
20410
20411
  },
20411
20412
  ];
20412
- exports.BuiltIn = BuiltIn;
20413
20413
  //# sourceMappingURL=_builtin.js.map
20414
20414
 
20415
20415
  /***/ }),
@@ -21368,7 +21368,7 @@ var ReferenceType;
21368
21368
  // FormVoidReference = "Form (void)",
21369
21369
  ReferenceType["DataReadReference"] = "Read From";
21370
21370
  ReferenceType["DataWriteReference"] = "Write To";
21371
- })(ReferenceType = exports.ReferenceType || (exports.ReferenceType = {}));
21371
+ })(ReferenceType || (exports.ReferenceType = ReferenceType = {}));
21372
21372
  //# sourceMappingURL=_reference.js.map
21373
21373
 
21374
21374
  /***/ }),
@@ -21401,7 +21401,7 @@ var ScopeType;
21401
21401
  ScopeType["For"] = "for";
21402
21402
  ScopeType["Let"] = "let";
21403
21403
  ScopeType["OpenSQL"] = "open_sql";
21404
- })(ScopeType = exports.ScopeType || (exports.ScopeType = {}));
21404
+ })(ScopeType || (exports.ScopeType = ScopeType = {}));
21405
21405
  //# sourceMappingURL=_scope_type.js.map
21406
21406
 
21407
21407
  /***/ }),
@@ -21474,6 +21474,7 @@ class TypeUtils {
21474
21474
  || type instanceof basic_1.UnknownType
21475
21475
  || type instanceof basic_1.NumericType
21476
21476
  || type instanceof basic_1.IntegerType
21477
+ || type instanceof basic_1.Integer8Type
21477
21478
  || type instanceof basic_1.SimpleType
21478
21479
  || type instanceof basic_1.FloatType
21479
21480
  || type instanceof basic_1.FloatingPointType
@@ -35117,13 +35118,13 @@ var TableAccessType;
35117
35118
  TableAccessType["hashed"] = "HASHED";
35118
35119
  TableAccessType["index"] = "INDEX";
35119
35120
  TableAccessType["any"] = "ANY";
35120
- })(TableAccessType = exports.TableAccessType || (exports.TableAccessType = {}));
35121
+ })(TableAccessType || (exports.TableAccessType = TableAccessType = {}));
35121
35122
  var TableKeyType;
35122
35123
  (function (TableKeyType) {
35123
35124
  TableKeyType["default"] = "DEFAULT";
35124
35125
  TableKeyType["user"] = "USER";
35125
35126
  TableKeyType["empty"] = "EMPTY";
35126
- })(TableKeyType = exports.TableKeyType || (exports.TableKeyType = {}));
35127
+ })(TableKeyType || (exports.TableKeyType = TableKeyType = {}));
35127
35128
  class TableType extends _abstract_type_1.AbstractType {
35128
35129
  constructor(rowType, options, qualifiedName) {
35129
35130
  var _a;
@@ -36021,7 +36022,7 @@ var FunctionModuleParameterDirection;
36021
36022
  FunctionModuleParameterDirection["exporting"] = "exporting";
36022
36023
  FunctionModuleParameterDirection["changing"] = "changing";
36023
36024
  FunctionModuleParameterDirection["tables"] = "tables";
36024
- })(FunctionModuleParameterDirection = exports.FunctionModuleParameterDirection || (exports.FunctionModuleParameterDirection = {}));
36025
+ })(FunctionModuleParameterDirection || (exports.FunctionModuleParameterDirection = FunctionModuleParameterDirection = {}));
36025
36026
  class FunctionModuleDefinition {
36026
36027
  constructor(data) {
36027
36028
  this.parse(data);
@@ -38705,7 +38706,7 @@ var DDLKind;
38705
38706
  (function (DDLKind) {
38706
38707
  DDLKind["Structure"] = "structure";
38707
38708
  DDLKind["Table"] = "table";
38708
- })(DDLKind = exports.DDLKind || (exports.DDLKind = {}));
38709
+ })(DDLKind || (exports.DDLKind = DDLKind = {}));
38709
38710
  class DDLParser {
38710
38711
  parse(file) {
38711
38712
  const tokens = ddl_lexer_1.DDLLexer.run(file);
@@ -41128,7 +41129,7 @@ var RenameType;
41128
41129
  RenameType[RenameType["Variable"] = 2] = "Variable";
41129
41130
  RenameType[RenameType["GlobalInterface"] = 3] = "GlobalInterface";
41130
41131
  RenameType[RenameType["Method"] = 4] = "Method";
41131
- })(RenameType = exports.RenameType || (exports.RenameType = {}));
41132
+ })(RenameType || (exports.RenameType = RenameType = {}));
41132
41133
  class Rename {
41133
41134
  constructor(reg) {
41134
41135
  this.reg = reg;
@@ -41147,18 +41148,23 @@ class Rename {
41147
41148
  return undefined;
41148
41149
  }
41149
41150
  const range = _lsp_utils_1.LSPUtils.tokenToRange(cursor.token);
41151
+ let placeholder = cursor.token.getStr();
41152
+ if (placeholder.startsWith("!")) {
41153
+ placeholder = placeholder.substring(1);
41154
+ range.start.character += 1;
41155
+ }
41150
41156
  const lookup = _lookup_1.LSPLookup.lookup(cursor, this.reg, obj);
41151
41157
  if ((lookup === null || lookup === void 0 ? void 0 : lookup.definitionId) instanceof _typed_identifier_1.TypedIdentifier) {
41152
- return { range, placeholder: cursor.token.getStr(), type: RenameType.Variable, file };
41158
+ return { range, placeholder, type: RenameType.Variable, file };
41153
41159
  }
41154
41160
  else if ((lookup === null || lookup === void 0 ? void 0 : lookup.definitionId) instanceof types_1.ClassDefinition) {
41155
- return { range, placeholder: cursor.token.getStr(), type: RenameType.GlobalClass, file };
41161
+ return { range, placeholder, type: RenameType.GlobalClass, file };
41156
41162
  }
41157
41163
  else if ((lookup === null || lookup === void 0 ? void 0 : lookup.definitionId) instanceof types_1.InterfaceDefinition) {
41158
- return { range, placeholder: cursor.token.getStr(), type: RenameType.GlobalInterface, file };
41164
+ return { range, placeholder, type: RenameType.GlobalInterface, file };
41159
41165
  }
41160
41166
  else if ((lookup === null || lookup === void 0 ? void 0 : lookup.definitionId) instanceof types_1.MethodDefinition) {
41161
- return { range, placeholder: cursor.token.getStr(), type: RenameType.Method, file };
41167
+ return { range, placeholder, type: RenameType.Method, file };
41162
41168
  }
41163
41169
  return undefined;
41164
41170
  }
@@ -41351,8 +41357,8 @@ class SemanticHighlighting {
41351
41357
  return ret;
41352
41358
  }
41353
41359
  }
41354
- SemanticHighlighting.tokenTypes = [];
41355
41360
  exports.SemanticHighlighting = SemanticHighlighting;
41361
+ SemanticHighlighting.tokenTypes = [];
41356
41362
  //# sourceMappingURL=semantic.js.map
41357
41363
 
41358
41364
  /***/ }),
@@ -42620,7 +42626,7 @@ var ClassCategory;
42620
42626
  ClassCategory["PersistentFactory"] = "11";
42621
42627
  ClassCategory["Exception"] = "40";
42622
42628
  ClassCategory["SharedObject"] = "45";
42623
- })(ClassCategory = exports.ClassCategory || (exports.ClassCategory = {}));
42629
+ })(ClassCategory || (exports.ClassCategory = ClassCategory = {}));
42624
42630
  class Class extends _abap_object_1.ABAPObject {
42625
42631
  constructor() {
42626
42632
  super(...arguments);
@@ -46680,7 +46686,7 @@ var EnhancementCategory;
46680
46686
  EnhancementCategory["Character"] = "2";
46681
46687
  EnhancementCategory["CharacterOrNumeric"] = "3";
46682
46688
  EnhancementCategory["Deep"] = "4";
46683
- })(EnhancementCategory = exports.EnhancementCategory || (exports.EnhancementCategory = {}));
46689
+ })(EnhancementCategory || (exports.EnhancementCategory = EnhancementCategory = {}));
46684
46690
  var TableCategory;
46685
46691
  (function (TableCategory) {
46686
46692
  TableCategory["Transparent"] = "TRANSP";
@@ -46689,7 +46695,7 @@ var TableCategory;
46689
46695
  TableCategory["Pooled"] = "POOL";
46690
46696
  TableCategory["View"] = "VIEW";
46691
46697
  TableCategory["Append"] = "APPEND";
46692
- })(TableCategory = exports.TableCategory || (exports.TableCategory = {}));
46698
+ })(TableCategory || (exports.TableCategory = TableCategory = {}));
46693
46699
  class Table extends _abstract_object_1.AbstractObject {
46694
46700
  getType() {
46695
46701
  return "TABL";
@@ -48155,7 +48161,7 @@ class Registry {
48155
48161
  }
48156
48162
  static abaplintVersion() {
48157
48163
  // magic, see build script "version.sh"
48158
- return "2.101.9";
48164
+ return "2.101.11";
48159
48165
  }
48160
48166
  getDDICReferences() {
48161
48167
  return this.ddicReferences;
@@ -48607,7 +48613,7 @@ var RuleTag;
48607
48613
  RuleTag["Styleguide"] = "Styleguide";
48608
48614
  /** Single file compatible, the rule gives correct results when having only information about the single file */
48609
48615
  RuleTag["SingleFile"] = "SingleFile";
48610
- })(RuleTag = exports.RuleTag || (exports.RuleTag = {}));
48616
+ })(RuleTag || (exports.RuleTag = RuleTag = {}));
48611
48617
  //# sourceMappingURL=_irule.js.map
48612
48618
 
48613
48619
  /***/ }),
@@ -55406,9 +55412,16 @@ ${indentation} output = ${topTarget}.`;
55406
55412
  const data = `DATA ${name} TYPE REF TO ${type}.\n` +
55407
55413
  indentation + abap + "\n" +
55408
55414
  indentation;
55409
- const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), data);
55410
- const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, found.getFirstToken().getStart(), found.getLastToken().getEnd(), name);
55411
- fix = edit_helper_1.EditHelper.merge(fix2, fix1);
55415
+ if (found.getFirstToken().getStart().equals(high.getFirstToken().getStart())
55416
+ && found.getLastToken().getEnd().equals(high.getLastToken().getStart())) {
55417
+ // full statement = standalone NEW expression
55418
+ fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), abap);
55419
+ }
55420
+ else {
55421
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), data);
55422
+ const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, found.getFirstToken().getStart(), found.getLastToken().getEnd(), name);
55423
+ fix = edit_helper_1.EditHelper.merge(fix2, fix1);
55424
+ }
55412
55425
  }
55413
55426
  if (fix) {
55414
55427
  return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Use CREATE OBJECT instead of NEW", this.getMetadata().key, this.conf.severity, fix);
@@ -55774,24 +55787,24 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
55774
55787
  }
55775
55788
  const candidates = [];
55776
55789
  if (this.getConfig().loop === true) {
55777
- candidates.push(...stru.findAllStructures(Structures.Loop));
55790
+ candidates.push(...stru.findAllStructuresRecursive(Structures.Loop));
55778
55791
  }
55779
55792
  if (this.getConfig().while === true) {
55780
- candidates.push(...stru.findAllStructures(Structures.While));
55793
+ candidates.push(...stru.findAllStructuresRecursive(Structures.While));
55781
55794
  }
55782
55795
  if (this.getConfig().case === true) {
55783
- candidates.push(...stru.findAllStructures(Structures.Case));
55796
+ candidates.push(...stru.findAllStructuresRecursive(Structures.Case));
55784
55797
  }
55785
55798
  if (this.getConfig().select === true) {
55786
- candidates.push(...stru.findAllStructures(Structures.Select));
55799
+ candidates.push(...stru.findAllStructuresRecursive(Structures.Select));
55787
55800
  }
55788
55801
  if (this.getConfig().do === true) {
55789
- candidates.push(...stru.findAllStructures(Structures.Do));
55802
+ candidates.push(...stru.findAllStructuresRecursive(Structures.Do));
55790
55803
  }
55791
55804
  if (this.getConfig().at === true) {
55792
- candidates.push(...stru.findAllStructures(Structures.At));
55793
- candidates.push(...stru.findAllStructures(Structures.AtFirst));
55794
- candidates.push(...stru.findAllStructures(Structures.AtLast));
55805
+ candidates.push(...stru.findAllStructuresRecursive(Structures.At));
55806
+ candidates.push(...stru.findAllStructuresRecursive(Structures.AtFirst));
55807
+ candidates.push(...stru.findAllStructuresRecursive(Structures.AtLast));
55795
55808
  }
55796
55809
  for (const l of candidates) {
55797
55810
  if (l.getChildren().length === 2) {
@@ -55801,7 +55814,7 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
55801
55814
  }
55802
55815
  }
55803
55816
  if (this.getConfig().try === true) {
55804
- const tries = stru.findAllStructures(Structures.Try);
55817
+ const tries = stru.findAllStructuresRecursive(Structures.Try);
55805
55818
  for (const t of tries) {
55806
55819
  const normal = t.findDirectStructure(Structures.Body);
55807
55820
  if (normal === undefined) {
@@ -55812,9 +55825,9 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
55812
55825
  }
55813
55826
  }
55814
55827
  if (this.getConfig().if === true) {
55815
- const tries = stru.findAllStructures(Structures.If)
55816
- .concat(stru.findAllStructures(Structures.Else))
55817
- .concat(stru.findAllStructures(Structures.ElseIf));
55828
+ const tries = stru.findAllStructuresRecursive(Structures.If)
55829
+ .concat(stru.findAllStructuresRecursive(Structures.Else))
55830
+ .concat(stru.findAllStructuresRecursive(Structures.ElseIf));
55818
55831
  for (const t of tries) {
55819
55832
  const normal = t.findDirectStructure(Structures.Body);
55820
55833
  if (normal === undefined) {
@@ -55825,7 +55838,7 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
55825
55838
  }
55826
55839
  }
55827
55840
  if (this.getConfig().when === true) {
55828
- const tries = stru.findAllStructures(Structures.When);
55841
+ const tries = stru.findAllStructuresRecursive(Structures.When);
55829
55842
  for (const t of tries) {
55830
55843
  if (t.getChildren().length === 1) {
55831
55844
  const token = t.getFirstToken();
@@ -58645,7 +58658,7 @@ var KeywordCaseStyle;
58645
58658
  (function (KeywordCaseStyle) {
58646
58659
  KeywordCaseStyle["Upper"] = "upper";
58647
58660
  KeywordCaseStyle["Lower"] = "lower";
58648
- })(KeywordCaseStyle = exports.KeywordCaseStyle || (exports.KeywordCaseStyle = {}));
58661
+ })(KeywordCaseStyle || (exports.KeywordCaseStyle = KeywordCaseStyle = {}));
58649
58662
  class KeywordCaseConf extends _basic_rule_config_1.BasicRuleConfig {
58650
58663
  constructor() {
58651
58664
  super(...arguments);
@@ -60892,7 +60905,7 @@ var NewlineLogic;
60892
60905
  (function (NewlineLogic) {
60893
60906
  NewlineLogic["Exact"] = "exact";
60894
60907
  NewlineLogic["Less"] = "less";
60895
- })(NewlineLogic = exports.NewlineLogic || (exports.NewlineLogic = {}));
60908
+ })(NewlineLogic || (exports.NewlineLogic = NewlineLogic = {}));
60896
60909
  class NewlineBetweenMethodsConf extends _basic_rule_config_1.BasicRuleConfig {
60897
60910
  constructor() {
60898
60911
  super(...arguments);
@@ -68646,7 +68659,7 @@ var Severity;
68646
68659
  Severity["Error"] = "Error";
68647
68660
  Severity["Warning"] = "Warning";
68648
68661
  Severity["Info"] = "Info";
68649
- })(Severity = exports.Severity || (exports.Severity = {}));
68662
+ })(Severity || (exports.Severity = Severity = {}));
68650
68663
  //# sourceMappingURL=severity.js.map
68651
68664
 
68652
68665
  /***/ }),
@@ -69295,7 +69308,7 @@ var Version;
69295
69308
  Version["v756"] = "v756";
69296
69309
  Version["v757"] = "v757";
69297
69310
  Version["Cloud"] = "Cloud";
69298
- })(Version = exports.Version || (exports.Version = {}));
69311
+ })(Version || (exports.Version = Version = {}));
69299
69312
  exports.defaultVersion = Version.v757;
69300
69313
  function getPreviousVersion(v) {
69301
69314
  if (v === Version.OpenABAP) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.101.9",
3
+ "version": "2.101.11",
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.101.9",
41
+ "@abaplint/core": "^2.101.11",
42
42
  "@types/chai": "^4.3.5",
43
43
  "@types/glob": "^7.2.0",
44
44
  "@types/minimist": "^1.2.2",
@@ -54,8 +54,8 @@
54
54
  "minimist": "^1.2.8",
55
55
  "mocha": "^10.2.0",
56
56
  "progress": "^2.0.3",
57
- "typescript": "^5.0.4",
58
- "webpack": "^5.84.1",
57
+ "typescript": "^5.1.3",
58
+ "webpack": "^5.85.0",
59
59
  "webpack-cli": "^5.1.1",
60
60
  "xml-js": "^1.6.11"
61
61
  },