@abaplint/transpiler-cli 2.12.6 → 2.12.8

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 -1
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -80442,6 +80442,15 @@ class MethodSourceTranspiler {
80442
80442
  }
80443
80443
  call += traversal.traverse(child).getCode();
80444
80444
  }
80445
+ else if (child.get() instanceof core_1.Expressions.SourceFieldSymbol) {
80446
+ call += traversal.traverse(child).getCode();
80447
+ }
80448
+ else if (child.get() instanceof core_1.Expressions.ComponentName) {
80449
+ call += `["${child.concatTokens().toLowerCase()}"]`;
80450
+ }
80451
+ else if (child.get() instanceof core_1.Tokens.Dash) {
80452
+ call += '.get()';
80453
+ }
80445
80454
  else {
80446
80455
  ret.appendString("MethodSourceTranspiler-" + child.get().constructor.name + "-todo");
80447
80456
  }
@@ -87909,7 +87918,11 @@ class PerformTranspiler {
87909
87918
  const name = t.getFirstToken().getStr();
87910
87919
  params.push(`"${name}": ` + traversal.traverse(t).getCode());
87911
87920
  }
87912
- return new chunk_1.Chunk("await " + ref + `({${params.join(",")}});`);
87921
+ let call = "await " + ref + `({${params.join(",")}});`;
87922
+ if (node.concatTokens().toUpperCase().includes(" IF FOUND")) {
87923
+ call = `if (${ref} !== undefined) { ${call} }`;
87924
+ }
87925
+ return new chunk_1.Chunk(call);
87913
87926
  }
87914
87927
  else {
87915
87928
  // todo: most of this needs rewriting?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.12.6",
3
+ "version": "2.12.8",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -28,7 +28,7 @@
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
30
  "@abaplint/core": "^2.113.233",
31
- "@abaplint/transpiler": "^2.12.6",
31
+ "@abaplint/transpiler": "^2.12.8",
32
32
  "@types/glob": "^8.1.0",
33
33
  "@types/node": "^24.9.1",
34
34
  "@types/progress": "^2.0.7",