@abaplint/transpiler-cli 2.7.0 → 2.7.1

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/bundle.js +17 -8
  2. package/package.json +4 -4
package/build/bundle.js CHANGED
@@ -24512,6 +24512,7 @@ class Source {
24512
24512
  {
24513
24513
  const foundType = this.determineType(node, scope, filename, targetType);
24514
24514
  new conv_body_1.ConvBody().runSyntax(node.findDirectExpression(Expressions.ConvBody), scope, filename);
24515
+ this.addIfInferred(node, scope, filename, foundType);
24515
24516
  return foundType;
24516
24517
  }
24517
24518
  case "REF":
@@ -37318,7 +37319,7 @@ class DDIC {
37318
37319
  case "SSTRING": // 1 <= len <= 1333
37319
37320
  case "STRG": // 256 <= len
37320
37321
  case "STRING": // 256 <= len
37321
- return new Types.StringType({ qualifiedName: qualifiedName });
37322
+ return new Types.StringType({ qualifiedName: qualifiedName || "STRING" });
37322
37323
  case "RSTR": // 256 <= len
37323
37324
  case "RAWSTRING": // 256 <= len
37324
37325
  case "GEOM_EWKB":
@@ -46810,7 +46811,7 @@ class Registry {
46810
46811
  }
46811
46812
  static abaplintVersion() {
46812
46813
  // magic, see build script "version.sh"
46813
- return "2.100.2";
46814
+ return "2.100.3";
46814
46815
  }
46815
46816
  getDDICReferences() {
46816
46817
  return this.ddicReferences;
@@ -54229,8 +54230,12 @@ class EmptyLineinStatement extends _abap_rule_1.ABAPRule {
54229
54230
  key: "empty_line_in_statement",
54230
54231
  title: "Find empty lines in statements",
54231
54232
  shortDescription: `Checks that statements do not contain empty lines.`,
54232
- extendedInformation: `https://docs.abapopenchecks.org/checks/41/`,
54233
- tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],
54233
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-obsess-with-separating-blank-lines
54234
+
54235
+ https://docs.abapopenchecks.org/checks/41/`,
54236
+ tags: [_irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
54237
+ badExample: `WRITE\n\nhello.`,
54238
+ goodExample: `WRITE hello.`,
54234
54239
  };
54235
54240
  }
54236
54241
  getMessage() {
@@ -78025,9 +78030,11 @@ class SelectTranspiler {
78025
78030
  const packageSize = (_b = node.findFirstExpression(abaplint.Expressions.SelectLoop)) === null || _b === void 0 ? void 0 : _b.findExpressionAfterToken("SIZE");
78026
78031
  if (packageSize) {
78027
78032
  const getSize = new expressions_1.SQLSourceTranspiler().transpile(packageSize, traversal).getCode() + ".get()";
78028
- ret.appendString(`if (${targetName}.array().length > ${getSize}) { throw new Error("PACKAGE SIZED loop larger than package size not supported"); };\n`);
78029
- ret.appendString(`abap.statements.append({source: ${targetName}, target: ${intoName}, lines: true});\n`);
78030
- ret.appendString(`{\n`);
78033
+ ret.appendString(`if (${targetName}.array().length > ${getSize}) {
78034
+ throw new Error("PACKAGE SIZED loop larger than package size not supported");
78035
+ };
78036
+ abap.statements.append({source: ${targetName}, target: ${intoName}, lines: true});
78037
+ {\n`);
78031
78038
  }
78032
78039
  else if (concat.includes(" INTO CORRESPONDING FIELDS OF ")) {
78033
78040
  ret.appendString(`\nfor (const ${loopName} of ${targetName}.array()) {\n`);
@@ -78751,10 +78758,12 @@ class Traversal {
78751
78758
  ret += "this.me = new abap.types.ABAPObject();\n";
78752
78759
  ret += "this.me.set(this);\n";
78753
78760
  for (const a of ((_a = def.getAttributes()) === null || _a === void 0 ? void 0 : _a.getAll()) || []) {
78761
+ const escaped = Traversal.escapeNamespace(a.getName().toLowerCase());
78754
78762
  if (a.getMeta().includes("static" /* abaplint.IdentifierMeta.Static */) === true) {
78763
+ ret += "this." + escaped + " = " + cName + "." + escaped + ";\n";
78755
78764
  continue;
78756
78765
  }
78757
- const name = "this." + Traversal.escapeNamespace(a.getName().toLowerCase());
78766
+ const name = "this." + escaped;
78758
78767
  ret += name + " = " + new transpile_types_1.TranspileTypes().toType(a.getType()) + ";\n";
78759
78768
  ret += this.setValues(a, name);
78760
78769
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -26,12 +26,12 @@
26
26
  "author": "abaplint",
27
27
  "license": "MIT",
28
28
  "devDependencies": {
29
- "@abaplint/transpiler": "^2.7.0",
29
+ "@abaplint/transpiler": "^2.7.1",
30
30
  "@types/glob": "^7.2.0",
31
31
  "glob": "=7.2.0",
32
32
  "@types/progress": "^2.0.5",
33
- "@types/node": "^20.1.4",
34
- "@abaplint/core": "^2.100.2",
33
+ "@types/node": "^20.1.5",
34
+ "@abaplint/core": "^2.100.3",
35
35
  "progress": "^2.0.3",
36
36
  "webpack": "^5.82.1",
37
37
  "webpack-cli": "^5.1.1",