@abaplint/transpiler-cli 2.8.16 → 2.8.18

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 +12 -6
  2. package/package.json +3 -3
package/build/bundle.js CHANGED
@@ -74856,13 +74856,11 @@ class MethodSourceTranspiler {
74856
74856
  if (second.get() instanceof core_1.Expressions.FieldChain && second instanceof core_1.Nodes.ExpressionNode) {
74857
74857
  const t = new _1.FieldChainTranspiler(true).transpile(second, traversal).getCode();
74858
74858
  call = traversal.lookupClassOrInterface(t, child.getFirstToken(), true);
74859
- ret.appendString(`if (${call} === undefined && ${illegalClass} === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_CLASS not found"; }\n`);
74860
- ret.appendString(`if (${call} === undefined) { throw new ${illegalClass}(); }\n`);
74859
+ ret.appendString(`if (${call} === undefined) { if (${illegalClass} === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_CLASS not found"; } else {throw new ${illegalClass}(); } }\n`);
74861
74860
  }
74862
74861
  else if (second.get() instanceof core_1.Expressions.Constant) {
74863
74862
  call = traversal.lookupClassOrInterface(second.getFirstToken().getStr(), child.getFirstToken(), true);
74864
- ret.appendString(`if (${call} === undefined && ${illegalClass} === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_CLASS not found"; }\n`);
74865
- ret.appendString(`if (${call} === undefined) { throw new ${illegalClass}(); }\n`);
74863
+ ret.appendString(`if (${call} === undefined) { if (${illegalClass} === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_CLASS not found"; } else {throw new ${illegalClass}(); } }\n`);
74866
74864
  const name = children[i + 2];
74867
74865
  if (name.get() instanceof core_1.Expressions.AttributeName) {
74868
74866
  const suffix = "." + name.concatTokens().toLowerCase().replace("~", "$");
@@ -75400,7 +75398,14 @@ class SQLCondTranspiler {
75400
75398
  ret += `" + abap.expandDynamic(${code}, (name) => {try { return eval(name);} catch {}}) + "`;
75401
75399
  }
75402
75400
  else {
75403
- throw new Error("SQL Condition, transpiler todo, dyn cond, " + c.concatTokens() + ", " + traversal.getFilename());
75401
+ const concat = c.concatTokens();
75402
+ if (concat.toUpperCase() === "('ENABLE_SQLITE = ABAP_TRUE')") {
75403
+ // yea, this is a workaround
75404
+ ret += ` \\"enable_sqlite\\" = 'X'`;
75405
+ }
75406
+ else {
75407
+ throw new Error("SQL Condition, transpiler todo, dyn cond, " + concat + ", " + traversal.getFilename());
75408
+ }
75404
75409
  }
75405
75410
  }
75406
75411
  else if (c.findDirectExpression(abaplint.Expressions.SQLIn)) {
@@ -84250,7 +84255,8 @@ class Traversal {
84250
84255
  return this.traverseExpression(node);
84251
84256
  }
84252
84257
  else if (node === undefined) {
84253
- throw new Error("Traverse, node undefined");
84258
+ // perhaps the file contains syntax errors? these are not reported for dependencies
84259
+ throw new Error("Traverse, node undefined, " + this.getFilename());
84254
84260
  }
84255
84261
  else {
84256
84262
  throw new Error("Traverse, unexpected node type");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.8.16",
3
+ "version": "2.8.18",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -26,11 +26,11 @@
26
26
  "author": "abaplint",
27
27
  "license": "MIT",
28
28
  "devDependencies": {
29
- "@abaplint/transpiler": "^2.8.16",
29
+ "@abaplint/transpiler": "^2.8.18",
30
30
  "@types/glob": "^8.1.0",
31
31
  "glob": "=7.2.0",
32
32
  "@types/progress": "^2.0.7",
33
- "@types/node": "^20.11.28",
33
+ "@types/node": "^20.11.29",
34
34
  "@abaplint/core": "^2.106.2",
35
35
  "progress": "^2.0.3",
36
36
  "webpack": "^5.90.3",