@abaplint/transpiler-cli 2.4.13 → 2.4.15

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 +21 -4
  2. package/package.json +3 -3
package/build/bundle.js CHANGED
@@ -6436,8 +6436,9 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
6436
6436
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
6437
6437
  class SQLFieldList extends combi_1.Expression {
6438
6438
  getRunnable() {
6439
- const comma = (0, combi_1.optPrio)((0, combi_1.ver)(version_1.Version.v740sp05, ","));
6440
- return (0, combi_1.altPrio)("*", _1.Dynamic, (0, combi_1.plusPrio)((0, combi_1.seq)(_1.SQLField, comma)));
6439
+ const nev = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.SQLField)));
6440
+ const old = (0, combi_1.starPrio)(_1.SQLField);
6441
+ return (0, combi_1.altPrio)("*", _1.Dynamic, (0, combi_1.seq)(_1.SQLField, (0, combi_1.alt)(nev, old)));
6441
6442
  }
6442
6443
  }
6443
6444
  exports.SQLFieldList = SQLFieldList;
@@ -26216,10 +26217,13 @@ class CreateObject {
26216
26217
  if (found instanceof basic_1.VoidType) {
26217
26218
  continue;
26218
26219
  }
26220
+ else if (found instanceof basic_1.UnknownType) {
26221
+ throw new Error("Target type unknown, " + t.concatTokens());
26222
+ }
26219
26223
  else if (!(found instanceof basic_1.ObjectReferenceType)
26220
26224
  && !(found instanceof basic_1.AnyType)
26221
26225
  && !(found instanceof basic_1.GenericObjectReferenceType)) {
26222
- throw new Error("Target must be an object reference");
26226
+ throw new Error("Target must be an object reference, " + t.concatTokens());
26223
26227
  }
26224
26228
  else if (found instanceof basic_1.GenericObjectReferenceType && type === undefined) {
26225
26229
  throw new Error("Generic type, cannot be instantiated");
@@ -45855,7 +45859,7 @@ class Registry {
45855
45859
  }
45856
45860
  static abaplintVersion() {
45857
45861
  // magic, see build script "version.sh"
45858
- return "2.95.14";
45862
+ return "2.95.15";
45859
45863
  }
45860
45864
  getDDICReferences() {
45861
45865
  return this.references;
@@ -73492,6 +73496,10 @@ class ReadTableTranspiler {
73492
73496
  const s = new expressions_1.SourceTranspiler().transpile(from, traversal).getCode();
73493
73497
  extra.push("from: " + s);
73494
73498
  }
73499
+ const binary = node.findTokenSequencePosition("BINARY", "SEARCH");
73500
+ if (binary) {
73501
+ extra.push("binarySearch: true");
73502
+ }
73495
73503
  const rt = node.findDirectExpression(abaplint.Expressions.ReadTableTarget);
73496
73504
  const target = rt === null || rt === void 0 ? void 0 : rt.findDirectExpression(abaplint.Expressions.Target);
73497
73505
  const fs = rt === null || rt === void 0 ? void 0 : rt.findDirectExpression(abaplint.Expressions.FSTarget);
@@ -73511,6 +73519,7 @@ class ReadTableTranspiler {
73511
73519
  const compare = node.findDirectExpression(abaplint.Expressions.ComponentCompareSimple);
73512
73520
  if (compare) {
73513
73521
  const conds = [];
73522
+ const blah = [];
73514
73523
  const count = compare.getChildren().length / 3;
73515
73524
  for (let i = 0; i < count; i++) {
73516
73525
  const left = compare.getChildren()[i * 3];
@@ -73533,12 +73542,15 @@ class ReadTableTranspiler {
73533
73542
  const id = unique_identifier_1.UniqueIdentifier.get();
73534
73543
  prefix += "const " + id + " = " + s + ";\n";
73535
73544
  conds.push("abap.compare.eq(i." + field + ", " + id + ")");
73545
+ blah.push(`{key: (i) => {return i.${field}}, value: ${id}}`);
73536
73546
  }
73537
73547
  else {
73538
73548
  conds.push("abap.compare.eq(i." + field + ", " + s + ")");
73549
+ blah.push(`{key: (i) => {return i.${field}}, value: ${s}}`);
73539
73550
  }
73540
73551
  }
73541
73552
  extra.push("withKey: (i) => {return " + conds.join(" && ") + ";}");
73553
+ extra.push(`withKeyValue: [${blah.join(",")}]`);
73542
73554
  }
73543
73555
  let concat = "";
73544
73556
  if (extra.length > 0) {
@@ -73947,6 +73959,8 @@ class SelectTranspiler {
73947
73959
  for await (const ${unique} of abap.statements.loop(${faeTranspiled})) {
73948
73960
  await abap.statements.select(${target}, {select: "${select.trim()}"${extra}}, {appending: true});
73949
73961
  }
73962
+ abap.statements.sort(${target});
73963
+ await abap.statements.deleteInternal(${target}, {adjacent: true});
73950
73964
  abap.builtin.sy.get().dbcnt.set(${target}.array().length);
73951
73965
  }`;
73952
73966
  return new chunk_1.Chunk().append(code, node, traversal);
@@ -78463,6 +78477,7 @@ function buildAttributesMap(attrStr, jPath) {
78463
78477
  if (this.options.transformAttributeName) {
78464
78478
  aName = this.options.transformAttributeName(aName);
78465
78479
  }
78480
+ if(aName === "__proto__") aName = "#__proto__";
78466
78481
  if (oldVal !== undefined) {
78467
78482
  if (this.options.trimValues) {
78468
78483
  oldVal = oldVal.trim();
@@ -79088,9 +79103,11 @@ class XmlNode{
79088
79103
  }
79089
79104
  add(key,val){
79090
79105
  // this.child.push( {name : key, val: val, isCdata: isCdata });
79106
+ if(key === "__proto__") key = "#__proto__";
79091
79107
  this.child.push( {[key]: val });
79092
79108
  }
79093
79109
  addChild(node) {
79110
+ if(node.tagname === "__proto__") node.tagname = "#__proto__";
79094
79111
  if(node[":@"] && Object.keys(node[":@"]).length > 0){
79095
79112
  this.child.push( { [node.tagname]: node.child, [":@"]: node[":@"] });
79096
79113
  }else{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.4.13",
3
+ "version": "2.4.15",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "bin": {
6
6
  "abap_transpile": "./abap_transpile"
@@ -25,11 +25,11 @@
25
25
  "author": "abaplint",
26
26
  "license": "MIT",
27
27
  "devDependencies": {
28
- "@abaplint/transpiler": "^2.4.13",
28
+ "@abaplint/transpiler": "^2.4.15",
29
29
  "@types/glob": "^7.2.0",
30
30
  "glob": "=7.2.0",
31
31
  "@types/progress": "^2.0.5",
32
- "@abaplint/core": "^2.95.14",
32
+ "@abaplint/core": "^2.95.15",
33
33
  "progress": "^2.0.3",
34
34
  "webpack": "^5.75.0",
35
35
  "webpack-cli": "^5.0.1",