@abaplint/transpiler-cli 2.5.68 → 2.5.69

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 +5 -1
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -70970,7 +70970,11 @@ class AssignTranspiler {
70970
70970
  }
70971
70971
  else if ((firstFirst === null || firstFirst === void 0 ? void 0 : firstFirst.get()) instanceof abaplint.Expressions.FieldChain && firstFirst instanceof abaplint.Nodes.ExpressionNode) {
70972
70972
  const code = new expressions_1.FieldChainTranspiler(true).transpile(firstFirst, traversal).getCode();
70973
- options.push(`dynamicSource: (() => {try { return eval(${code}.toLowerCase().match(/\\w+/)[0]); } catch {}})()`);
70973
+ options.push(`dynamicSource: (() => {
70974
+ const name = ${code}.toLowerCase().replace(/[~\\/]/g, "$").match(/[\\w\\$\\/]+/)[0];
70975
+ try { return eval(name); } catch {}
70976
+ try { return eval("this." + name); } catch {}
70977
+ })()`);
70974
70978
  }
70975
70979
  }
70976
70980
  else if ((first === null || first === void 0 ? void 0 : first.get()) instanceof abaplint.Expressions.Source && first instanceof abaplint.Nodes.ExpressionNode) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.5.68",
3
+ "version": "2.5.69",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "bin": {
6
6
  "abap_transpile": "./abap_transpile"
@@ -25,7 +25,7 @@
25
25
  "author": "abaplint",
26
26
  "license": "MIT",
27
27
  "devDependencies": {
28
- "@abaplint/transpiler": "^2.5.68",
28
+ "@abaplint/transpiler": "^2.5.69",
29
29
  "@types/glob": "^7.2.0",
30
30
  "glob": "=7.2.0",
31
31
  "@types/progress": "^2.0.5",