@abaplint/transpiler-cli 2.7.141 → 2.7.143

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 +14 -11
  2. package/package.json +4 -4
package/build/bundle.js CHANGED
@@ -6323,13 +6323,14 @@ class Select extends combi_1.Expression {
6323
6323
  const offset = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("OFFSET", _1.SQLSource));
6324
6324
  const bypass = (0, combi_1.str)("BYPASSING BUFFER");
6325
6325
  const fields = (0, combi_1.ver)(version_1.Version.v750, _1.SQLFields);
6326
- const perm = (0, combi_1.per)(_1.SQLFrom, into, _1.SQLForAllEntries, where, _1.SQLOrderBy, sql_up_to_1.SQLUpTo, offset, _1.SQLClient, _1.SQLHaving, bypass, sql_group_by_1.SQLGroupBy, fields, _1.DatabaseConnection);
6327
- const permSingle = (0, combi_1.per)(_1.SQLFrom, (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList), where, _1.SQLClient, bypass, fields, _1.DatabaseConnection);
6326
+ // todo, HINTS cannot be anywhere, need an expression dedicated for strict sql
6327
+ const perm = (0, combi_1.per)(_1.SQLFrom, into, _1.SQLForAllEntries, where, _1.SQLOrderBy, sql_up_to_1.SQLUpTo, offset, _1.SQLClient, _1.SQLHaving, bypass, sql_group_by_1.SQLGroupBy, fields, _1.DatabaseConnection, _1.SQLHints);
6328
+ const permSingle = (0, combi_1.per)(_1.SQLFrom, (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList), where, _1.SQLClient, bypass, fields, _1.DatabaseConnection, _1.SQLHints);
6328
6329
  const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), sql_field_name_1.SQLFieldName, (0, combi_1.tok)(tokens_1.WParenRightW));
6329
6330
  const fieldList = (0, combi_1.optPrio)((0, combi_1.altPrio)(_1.SQLFieldList, paren));
6330
6331
  const single = (0, combi_1.seq)("SINGLE", (0, combi_1.optPrio)("FOR UPDATE"), fieldList, permSingle);
6331
6332
  const other = (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), fieldList, perm);
6332
- const ret = (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)(single, other), (0, combi_1.optPrio)(_1.SQLHints));
6333
+ const ret = (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)(single, other));
6333
6334
  return ret;
6334
6335
  }
6335
6336
  }
@@ -7433,7 +7434,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
7433
7434
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
7434
7435
  class SQLJoin extends combi_1.Expression {
7435
7436
  getRunnable() {
7436
- const joinType = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("INNER", "LEFT OUTER", "LEFT")), "JOIN");
7437
+ const joinType = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("INNER", "LEFT OUTER", "LEFT", "RIGHT OUTER", "RIGHT")), "JOIN");
7437
7438
  const join = (0, combi_1.seq)(joinType, _1.SQLFromSource, "ON", _1.SQLCond);
7438
7439
  return join;
7439
7440
  }
@@ -50074,7 +50075,7 @@ class Registry {
50074
50075
  }
50075
50076
  static abaplintVersion() {
50076
50077
  // magic, see build script "version.sh"
50077
- return "2.105.9";
50078
+ return "2.105.11";
50078
50079
  }
50079
50080
  getDDICReferences() {
50080
50081
  return this.ddicReferences;
@@ -74965,6 +74966,7 @@ const simple_source3_1 = __webpack_require__(/*! ./simple_source3 */ "./node_mod
74965
74966
  const field_chain_1 = __webpack_require__(/*! ./field_chain */ "./node_modules/@abaplint/transpiler/build/src/expressions/field_chain.js");
74966
74967
  const sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_name.js");
74967
74968
  const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
74969
+ const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/transpiler/build/src/expressions/source.js");
74968
74970
  class SQLCondTranspiler {
74969
74971
  transpile(node, traversal, table) {
74970
74972
  var _a;
@@ -75014,7 +75016,8 @@ class SQLCondTranspiler {
75014
75016
  pre = "NOT ";
75015
75017
  }
75016
75018
  if (sqlin.getChildren().length === 2) {
75017
- return `${pre}" + abap.expandIN("${fieldName.concatTokens()}", ${source.concatTokens()}) + "`;
75019
+ const s = new source_1.SourceTranspiler().transpile(source, traversal).getCode();
75020
+ return `${pre}" + abap.expandIN("${fieldName.concatTokens()}", ${s}) + "`;
75018
75021
  }
75019
75022
  else {
75020
75023
  const cond = [];
@@ -86593,9 +86596,9 @@ const xmlNode = __webpack_require__(/*! ./xmlNode */ "./node_modules/fast-xml-pa
86593
86596
  const readDocType = __webpack_require__(/*! ./DocTypeReader */ "./node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js");
86594
86597
  const toNumber = __webpack_require__(/*! strnum */ "./node_modules/strnum/strnum.js");
86595
86598
 
86596
- const regx =
86597
- '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)'
86598
- .replace(/NAME/g, util.nameRegexp);
86599
+ // const regx =
86600
+ // '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)'
86601
+ // .replace(/NAME/g, util.nameRegexp);
86599
86602
 
86600
86603
  //const tagsRegx = new RegExp("<(\\/?[\\w:\\-\._]+)([^>]*)>(\\s*"+cdataRegx+")*([^<]+)?","g");
86601
86604
  //const tagsRegx = new RegExp("<(\\/?)((\\w*:)?([\\w:\\-\._]+))([^>]*)>([^<]*)("+cdataRegx+"([^<]*))*([^<]+)?","g");
@@ -87088,8 +87091,8 @@ function readTagExp(xmlData,i, removeNSPrefix, closingChar = ">"){
87088
87091
  let tagName = tagExp;
87089
87092
  let attrExpPresent = true;
87090
87093
  if(separatorIndex !== -1){//separate tag name and attributes expression
87091
- tagName = tagExp.substr(0, separatorIndex).replace(/\s\s*$/, '');
87092
- tagExp = tagExp.substr(separatorIndex + 1);
87094
+ tagName = tagExp.substring(0, separatorIndex);
87095
+ tagExp = tagExp.substring(separatorIndex + 1).trimStart();
87093
87096
  }
87094
87097
 
87095
87098
  const rawTagName = tagName;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.7.141",
3
+ "version": "2.7.143",
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.141",
29
+ "@abaplint/transpiler": "^2.7.143",
30
30
  "@types/glob": "^7.2.0",
31
31
  "glob": "=7.2.0",
32
32
  "@types/progress": "^2.0.7",
33
- "@types/node": "^20.10.8",
34
- "@abaplint/core": "^2.105.9",
33
+ "@types/node": "^20.11.5",
34
+ "@abaplint/core": "^2.105.11",
35
35
  "progress": "^2.0.3",
36
36
  "webpack": "^5.89.0",
37
37
  "webpack-cli": "^5.1.4",