@abaplint/transpiler-cli 2.13.53 → 2.13.55

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 +4 -4
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -116811,9 +116811,9 @@ class SetHandlerTranspiler {
116811
116811
  let eventName = undefined;
116812
116812
  for (const m of node.findDirectExpressions(abaplint.Expressions.MethodSource)) {
116813
116813
  const msource = new expressions_1.MethodSourceTranspiler("", true).transpile(m, traversal).getCode().replace("await ", "");
116814
- // fallback to private method,
116815
- // msource = "(" + msource + " || " + msource.replace(/(\w+)$/, "#$1") + ")";
116816
- methods.push(msource + ".bind(this)");
116814
+ const lastDot = msource.lastIndexOf(".");
116815
+ const receiver = lastDot === -1 ? "this" : msource.substring(0, lastDot);
116816
+ methods.push(`{method: ${msource}, receiver: ${receiver}}`);
116817
116817
  if (eventClass === undefined) {
116818
116818
  const nameToken = m.getLastToken();
116819
116819
  const scope = traversal.findCurrentScopeByToken(nameToken);
@@ -116827,7 +116827,7 @@ class SetHandlerTranspiler {
116827
116827
  }
116828
116828
  let f = undefined;
116829
116829
  const forExpression = node.findExpressionAfterToken("FOR");
116830
- if (forExpression instanceof abaplint.Expressions.Source) {
116830
+ if (forExpression?.get() instanceof abaplint.Expressions.Source) {
116831
116831
  f = new expressions_1.SourceTranspiler().transpile(forExpression, traversal).getCode();
116832
116832
  }
116833
116833
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.13.53",
3
+ "version": "2.13.55",
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.120.20",
31
- "@abaplint/transpiler": "^2.13.53",
31
+ "@abaplint/transpiler": "^2.13.55",
32
32
  "@types/glob": "^8.1.0",
33
33
  "@types/node": "^24.13.3",
34
34
  "@types/progress": "^2.0.7",