@abaplint/transpiler-cli 2.11.36 → 2.11.37

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 +53 -5
  2. package/package.json +3 -3
package/build/bundle.js CHANGED
@@ -7130,7 +7130,7 @@ class SQLCompare extends combi_1.Expression {
7130
7130
  const sub = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("ALL", "ANY", "SOME")), (0, combi_1.altPrio)(subSelect, subSelectDouble));
7131
7131
  const arith = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/"), _1.SQLFieldName)));
7132
7132
  const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
7133
- const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(_1.SimpleSource3, paren)));
7133
+ const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(_1.SimpleSource3, paren)), version_1.Version.OpenABAP);
7134
7134
  const rett = (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLFunction, _1.ConstantString, (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLPath, _1.SQLFieldName), (0, combi_1.optPrio)(arith)), at), (0, combi_1.altPrio)((0, combi_1.seq)(_1.SQLCompareOperator, (0, combi_1.altPrio)(sub, source)), (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)(_1.SQLIn, like, between)), nul));
7135
7135
  const exists = (0, combi_1.seq)("EXISTS", subSelect);
7136
7136
  return (0, combi_1.altPrio)(exists, _1.Dynamic, rett);
@@ -7802,7 +7802,7 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
7802
7802
  class SQLSource extends combi_1.Expression {
7803
7803
  getRunnable() {
7804
7804
  const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
7805
- const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(_1.SimpleSource3, paren)));
7805
+ const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(_1.SimpleSource3, paren)), version_1.Version.OpenABAP);
7806
7806
  return (0, combi_1.altPrio)(_1.SQLAliasField, _1.SimpleSource3, at);
7807
7807
  }
7808
7808
  }
@@ -7855,7 +7855,7 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
7855
7855
  class SQLSourceSimple extends combi_1.Expression {
7856
7856
  getRunnable() {
7857
7857
  const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
7858
- const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.alt)(_1.SimpleSource3, paren)));
7858
+ const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.alt)(_1.SimpleSource3, paren)), version_1.Version.OpenABAP);
7859
7859
  return (0, combi_1.alt)(_1.SimpleSource3, at);
7860
7860
  }
7861
7861
  }
@@ -53791,7 +53791,7 @@ class Registry {
53791
53791
  }
53792
53792
  static abaplintVersion() {
53793
53793
  // magic, see build script "version.sh"
53794
- return "2.113.178";
53794
+ return "2.113.180";
53795
53795
  }
53796
53796
  getDDICReferences() {
53797
53797
  return this.ddicReferences;
@@ -80869,7 +80869,10 @@ class SQLFieldListTranspiler {
80869
80869
  fields.push(code);
80870
80870
  }
80871
80871
  else {
80872
- fields.push(f.concatTokens());
80872
+ const concat = f.concatTokens();
80873
+ if (concat !== ",") {
80874
+ fields.push(concat);
80875
+ }
80873
80876
  }
80874
80877
  }
80875
80878
  return new chunk_1.Chunk().append(fields.join(", "), node, traversal);
@@ -80992,6 +80995,46 @@ exports.SQLFromSourceTranspiler = SQLFromSourceTranspiler;
80992
80995
 
80993
80996
  /***/ }),
80994
80997
 
80998
+ /***/ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_group_by.js":
80999
+ /*!*********************************************************************************!*\
81000
+ !*** ./node_modules/@abaplint/transpiler/build/src/expressions/sql_group_by.js ***!
81001
+ \*********************************************************************************/
81002
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
81003
+
81004
+ "use strict";
81005
+
81006
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
81007
+ exports.SQLGroupByTranspiler = void 0;
81008
+ const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
81009
+ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
81010
+ const sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_name.js");
81011
+ class SQLGroupByTranspiler {
81012
+ transpile(node, traversal) {
81013
+ const fields = [];
81014
+ for (const f of node.getChildren()) {
81015
+ if (f instanceof abaplint.Nodes.TokenNode) {
81016
+ // keywords
81017
+ continue;
81018
+ }
81019
+ else if (f instanceof abaplint.Nodes.ExpressionNode && f.get() instanceof abaplint.Expressions.SQLFieldName) {
81020
+ const code = new sql_field_name_1.SQLFieldNameTranspiler().transpile(f, traversal).getCode();
81021
+ fields.push(code);
81022
+ }
81023
+ else {
81024
+ const concat = f.concatTokens();
81025
+ if (concat !== ",") {
81026
+ fields.push(concat);
81027
+ }
81028
+ }
81029
+ }
81030
+ return new chunk_1.Chunk().appendString("GROUP BY ").append(fields.join(", "), node, traversal);
81031
+ }
81032
+ }
81033
+ exports.SQLGroupByTranspiler = SQLGroupByTranspiler;
81034
+ //# sourceMappingURL=sql_group_by.js.map
81035
+
81036
+ /***/ }),
81037
+
80995
81038
  /***/ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_into_list.js":
80996
81039
  /*!**********************************************************************************!*\
80997
81040
  !*** ./node_modules/@abaplint/transpiler/build/src/expressions/sql_into_list.js ***!
@@ -87758,6 +87801,7 @@ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/tr
87758
87801
  const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/transpiler/build/src/expressions/index.js");
87759
87802
  const unique_identifier_1 = __webpack_require__(/*! ../unique_identifier */ "./node_modules/@abaplint/transpiler/build/src/unique_identifier.js");
87760
87803
  const sql_from_1 = __webpack_require__(/*! ../expressions/sql_from */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_from.js");
87804
+ const sql_group_by_1 = __webpack_require__(/*! ../expressions/sql_group_by */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_group_by.js");
87761
87805
  function escapeRegExp(string) {
87762
87806
  return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
87763
87807
  }
@@ -87789,6 +87833,10 @@ class SelectTranspiler {
87789
87833
  if (from) {
87790
87834
  select += new sql_from_1.SQLFromTranspiler().transpile(from, traversal).getCode();
87791
87835
  }
87836
+ const groupBy = node.findFirstExpression(abaplint.Expressions.SQLGroupBy);
87837
+ if (groupBy) {
87838
+ select += new sql_group_by_1.SQLGroupByTranspiler().transpile(groupBy, traversal).getCode();
87839
+ }
87792
87840
  const { table, keys } = this.findTable(node, traversal);
87793
87841
  let where = undefined;
87794
87842
  for (const sqlCond of node.findAllExpressions(abaplint.Expressions.SQLCond)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.11.36",
3
+ "version": "2.11.37",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -27,8 +27,8 @@
27
27
  "author": "abaplint",
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
- "@abaplint/core": "^2.113.178",
31
- "@abaplint/transpiler": "^2.11.36",
30
+ "@abaplint/core": "^2.113.180",
31
+ "@abaplint/transpiler": "^2.11.37",
32
32
  "@types/glob": "^8.1.0",
33
33
  "@types/node": "^24.3.0",
34
34
  "@types/progress": "^2.0.7",