@abaplint/cli 2.113.14 → 2.113.16

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 +19 -6
  2. package/package.json +5 -5
package/build/cli.js CHANGED
@@ -52747,7 +52747,7 @@ class Registry {
52747
52747
  }
52748
52748
  static abaplintVersion() {
52749
52749
  // magic, see build script "version.sh"
52750
- return "2.113.14";
52750
+ return "2.113.16";
52751
52751
  }
52752
52752
  getDDICReferences() {
52753
52753
  return this.ddicReferences;
@@ -58561,7 +58561,7 @@ ${indentation}`);
58561
58561
  return issue_1.Issue.atToken(lowFile, inlineData.getFirstToken(), "Outline SELECT @DATA", this.getMetadata().key, this.conf.severity, fix);
58562
58562
  }
58563
58563
  downportSelectTableInline(low, high, lowFile, highSyntax) {
58564
- var _a, _b, _c;
58564
+ var _a, _b, _c, _d, _e;
58565
58565
  if (!(low.get() instanceof _statement_1.Unknown)) {
58566
58566
  return undefined;
58567
58567
  }
@@ -58587,17 +58587,22 @@ ${indentation}`);
58587
58587
  return undefined;
58588
58588
  }
58589
58589
  let fieldDefinitions = "";
58590
- for (const f of fieldList.findAllExpressions(Expressions.SQLFieldName)) {
58591
- let fieldName = f.concatTokens();
58590
+ for (const f of fieldList.findAllExpressions(Expressions.SQLField)) {
58591
+ let fieldName = (_c = f.findFirstExpression(Expressions.SQLFieldName)) === null || _c === void 0 ? void 0 : _c.concatTokens();
58592
+ if (fieldName === undefined) {
58593
+ continue;
58594
+ }
58592
58595
  if (fieldName.includes("~")) {
58593
58596
  const split = fieldName.split("~");
58594
58597
  tableName = split[0];
58595
58598
  fieldName = split[1];
58596
58599
  }
58597
- fieldDefinitions += indentation + " " + fieldName + " TYPE " + tableName + "-" + fieldName + ",\n";
58600
+ const typeName = tableName + "-" + fieldName;
58601
+ fieldName = ((_d = f.findFirstExpression(Expressions.SQLAsName)) === null || _d === void 0 ? void 0 : _d.concatTokens()) || fieldName;
58602
+ fieldDefinitions += indentation + " " + fieldName + " TYPE " + typeName + ",\n";
58598
58603
  }
58599
58604
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
58600
- const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || "error";
58605
+ const name = ((_e = inlineData.findFirstExpression(Expressions.TargetField)) === null || _e === void 0 ? void 0 : _e.concatTokens()) || "error";
58601
58606
  let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},
58602
58607
  ${fieldDefinitions}${indentation} END OF ${uniqueName}.
58603
58608
  ${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.
@@ -63706,6 +63711,7 @@ ENDCLASS.`,
63706
63711
  };
63707
63712
  const expected = new indent_1.Indent(indentOpts).getExpectedIndents(file);
63708
63713
  const ret = [];
63714
+ let previous = undefined;
63709
63715
  for (const statement of file.getStatements()) {
63710
63716
  const position = statement.getFirstToken().getStart();
63711
63717
  if (position instanceof virtual_position_1.VirtualPosition) {
@@ -63740,6 +63746,12 @@ ENDCLASS.`,
63740
63746
  continue;
63741
63747
  }
63742
63748
  }
63749
+ // only apply for the first statement in a chain
63750
+ if (statement.getColon() !== undefined
63751
+ && (previous === null || previous === void 0 ? void 0 : previous.getColon()) !== undefined
63752
+ && statement.getColon().getStart().equals(previous.getColon().getStart())) {
63753
+ continue;
63754
+ }
63743
63755
  if (indent && indent > 0 && indent !== position.getCol()) {
63744
63756
  const expected = indent - 1;
63745
63757
  const fix = edit_helper_1.EditHelper.replaceRange(file, new position_1.Position(position.getRow(), 1), position, " ".repeat(expected));
@@ -63750,6 +63762,7 @@ ENDCLASS.`,
63750
63762
  break;
63751
63763
  }
63752
63764
  }
63765
+ previous = statement;
63753
63766
  }
63754
63767
  return ret;
63755
63768
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.14",
3
+ "version": "2.113.16",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,12 +38,12 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.113.14",
42
- "@types/chai": "^4.3.19",
41
+ "@abaplint/core": "^2.113.16",
42
+ "@types/chai": "^4.3.20",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.8",
46
- "@types/node": "^22.7.0",
46
+ "@types/node": "^22.7.3",
47
47
  "@types/progress": "^2.0.7",
48
48
  "chai": "^4.5.0",
49
49
  "chalk": "^5.3.0",
@@ -55,7 +55,7 @@
55
55
  "mocha": "^10.7.3",
56
56
  "progress": "^2.0.3",
57
57
  "typescript": "^5.6.2",
58
- "webpack": "^5.94.0",
58
+ "webpack": "^5.95.0",
59
59
  "webpack-cli": "^5.1.4",
60
60
  "xml-js": "^1.6.11"
61
61
  },