@abaplint/cli 2.112.5 → 2.112.7

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 +22 -30
  2. package/package.json +6 -6
package/build/cli.js CHANGED
@@ -9653,7 +9653,7 @@ class StatementParser {
9653
9653
  continue; // probably punctuation
9654
9654
  }
9655
9655
  const s = this.categorizeStatement(new nodes_1.StatementNode(new _statement_1.Unknown()).setChildren(this.tokensToNodes(second)));
9656
- if (!(s.get() instanceof _statement_1.Unknown)) {
9656
+ if (!(s.get() instanceof _statement_1.Unknown) && !(s.get() instanceof _statement_1.Empty)) {
9657
9657
  result.push(new nodes_1.StatementNode(new _statement_1.Unknown()).setChildren(this.tokensToNodes(first)));
9658
9658
  statement = s;
9659
9659
  break;
@@ -22098,9 +22098,9 @@ class ObjectOriented {
22098
22098
  return ignore;
22099
22099
  }
22100
22100
  // returns list of interfaces implemented
22101
- fromInterfaces(classDefinition, skip) {
22101
+ fromInterfaces(definition, skip) {
22102
22102
  const ignore = [];
22103
- for (const i of classDefinition.getImplementing()) {
22103
+ for (const i of definition.getImplementing()) {
22104
22104
  ignore.push(...this.fromInterfaceByName(i.name, ignore.concat(skip || [])));
22105
22105
  }
22106
22106
  return ignore;
@@ -38730,6 +38730,7 @@ const _scope_type_1 = __webpack_require__(/*! ../5_syntax/_scope_type */ "./node
38730
38730
  const event_definition_1 = __webpack_require__(/*! ./event_definition */ "./node_modules/@abaplint/core/build/src/abap/types/event_definition.js");
38731
38731
  const method_definitions_1 = __webpack_require__(/*! ./method_definitions */ "./node_modules/@abaplint/core/build/src/abap/types/method_definitions.js");
38732
38732
  const _reference_1 = __webpack_require__(/*! ../5_syntax/_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
38733
+ const _object_oriented_1 = __webpack_require__(/*! ../5_syntax/_object_oriented */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js");
38733
38734
  class InterfaceDefinition extends _identifier_1.Identifier {
38734
38735
  constructor(node, input) {
38735
38736
  if (!(node.get() instanceof Structures.Interface)) {
@@ -38795,32 +38796,12 @@ class InterfaceDefinition extends _identifier_1.Identifier {
38795
38796
  }
38796
38797
  parse(input, node) {
38797
38798
  this.checkInterfacesExists(input, node);
38799
+ const helper = new _object_oriented_1.ObjectOriented(input.scope);
38800
+ helper.fromInterfaces(this);
38798
38801
  // todo, proper sequencing, the statements should be processed line by line
38799
38802
  this.attributes = new class_attributes_1.Attributes(node, input);
38800
38803
  this.typeDefinitions = this.attributes.getTypes();
38801
38804
  this.aliases = this.attributes.getAliases();
38802
- // todo, cleanup aliases, vs "object_oriented.ts" vs "class_implementation.ts"
38803
- // this adds the aliased types to scope?
38804
- /*
38805
- for (const a of this.aliases) {
38806
- const [objName, fieldName] = a.getComponent().split("~");
38807
- const idef = input.scope.findInterfaceDefinition(objName);
38808
- if (idef) {
38809
- const foundType = idef.getTypeDefinitions().getByName(fieldName);
38810
- if (foundType) {
38811
- input.scope.addTypeNamed(a.getName(), foundType);
38812
- } else {
38813
- const foundField = idef.getAttributes().findByName(fieldName);
38814
- if (foundField && foundField instanceof ClassConstant) {
38815
- const token = new TokenIdentifier(a.getStart(), a.getName());
38816
- const id = new TypedIdentifier(token, input.filename, foundField.getType());
38817
- const constant = new ClassConstant(id, Visibility.Public, foundField.getValue());
38818
- input.scope.addIdentifier(constant);
38819
- }
38820
- }
38821
- }
38822
- }
38823
- */
38824
38805
  const events = node.findAllStatements(Statements.Events);
38825
38806
  for (const e of events) {
38826
38807
  this.events.push(new event_definition_1.EventDefinition(e, visibility_1.Visibility.Public, input));
@@ -52350,7 +52331,7 @@ class Registry {
52350
52331
  }
52351
52332
  static abaplintVersion() {
52352
52333
  // magic, see build script "version.sh"
52353
- return "2.112.5";
52334
+ return "2.112.7";
52354
52335
  }
52355
52336
  getDDICReferences() {
52356
52337
  return this.ddicReferences;
@@ -76419,6 +76400,7 @@ Builder.prototype.j2x = function(jObj, level) {
76419
76400
  //repeated nodes
76420
76401
  const arrLen = jObj[key].length;
76421
76402
  let listTagVal = "";
76403
+ let listTagAttr = "";
76422
76404
  for (let j = 0; j < arrLen; j++) {
76423
76405
  const item = jObj[key][j];
76424
76406
  if (typeof item === 'undefined') {
@@ -76428,17 +76410,27 @@ Builder.prototype.j2x = function(jObj, level) {
76428
76410
  else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
76429
76411
  // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
76430
76412
  } else if (typeof item === 'object') {
76431
- if(this.options.oneListGroup ){
76432
- listTagVal += this.j2x(item, level + 1).val;
76413
+ if(this.options.oneListGroup){
76414
+ const result = this.j2x(item, level + 1);
76415
+ listTagVal += result.val;
76416
+ if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {
76417
+ listTagAttr += result.attrStr
76418
+ }
76433
76419
  }else{
76434
76420
  listTagVal += this.processTextOrObjNode(item, key, level)
76435
76421
  }
76436
76422
  } else {
76437
- listTagVal += this.buildTextValNode(item, key, '', level);
76423
+ if (this.options.oneListGroup) {
76424
+ let textValue = this.options.tagValueProcessor(key, item);
76425
+ textValue = this.replaceEntitiesValue(textValue);
76426
+ listTagVal += textValue;
76427
+ } else {
76428
+ listTagVal += this.buildTextValNode(item, key, '', level);
76429
+ }
76438
76430
  }
76439
76431
  }
76440
76432
  if(this.options.oneListGroup){
76441
- listTagVal = this.buildObjectNode(listTagVal, key, '', level);
76433
+ listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);
76442
76434
  }
76443
76435
  val += listTagVal;
76444
76436
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.112.5",
3
+ "version": "2.112.7",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,23 +38,23 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.112.5",
41
+ "@abaplint/core": "^2.112.7",
42
42
  "@types/chai": "^4.3.16",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.7",
46
- "@types/node": "^20.14.11",
46
+ "@types/node": "^22.0.0",
47
47
  "@types/progress": "^2.0.7",
48
- "chai": "^4.4.1",
48
+ "chai": "^4.5.0",
49
49
  "chalk": "^5.3.0",
50
50
  "eslint": "^8.57.0",
51
51
  "glob": "^7.2.3",
52
52
  "json5": "^2.2.3",
53
- "memfs": "^4.9.3",
53
+ "memfs": "=4.9.3",
54
54
  "minimist": "^1.2.8",
55
55
  "mocha": "^10.7.0",
56
56
  "progress": "^2.0.3",
57
- "typescript": "^5.5.3",
57
+ "typescript": "^5.5.4",
58
58
  "webpack": "^5.93.0",
59
59
  "webpack-cli": "^5.1.4",
60
60
  "xml-js": "^1.6.11"