@abaplint/transpiler-cli 2.5.35 → 2.5.37

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 +8 -2
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -76002,16 +76002,22 @@ class ClassImplementationTranspiler {
76002
76002
  // but this will probably work
76003
76003
  if (traversal.getCurrentObject().getType() === "CLAS") {
76004
76004
  // gather call of all class constructors together for a global class, also local classes
76005
- // as they might use the global class
76005
+ // as they might use the global class, except for local testclass constructors
76006
76006
  if (cdef.isGlobal() === true) {
76007
76007
  for (const f of traversal.getCurrentObject().getABAPFiles()) {
76008
76008
  for (const def of f.getInfo().listClassDefinitions()) {
76009
- if (def.methods.some(m => m.name.toLowerCase() === "class_constructor")) {
76009
+ if (def.isForTesting === true) {
76010
+ continue;
76011
+ }
76012
+ else if (def.methods.some(m => m.name.toLowerCase() === "class_constructor")) {
76010
76013
  ret += "await " + traversal.lookupClassOrInterface(def.name, node.getFirstToken()) + ".class_constructor();\n";
76011
76014
  }
76012
76015
  }
76013
76016
  }
76014
76017
  }
76018
+ if (cdef.isGlobal() === false && cdef.isForTesting() === true && cdef.getMethodDefinitions().getByName("class_constructor")) {
76019
+ ret += "await " + traversal_1.Traversal.escapeNamespace(node.getFirstToken().getStr().toLowerCase()) + ".class_constructor();\n";
76020
+ }
76015
76021
  }
76016
76022
  else if (cdef.getMethodDefinitions().getByName("class_constructor")) {
76017
76023
  ret += "await " + traversal_1.Traversal.escapeNamespace(node.getFirstToken().getStr().toLowerCase()) + ".class_constructor();\n";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.5.35",
3
+ "version": "2.5.37",
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.35",
28
+ "@abaplint/transpiler": "^2.5.37",
29
29
  "@types/glob": "^7.2.0",
30
30
  "glob": "=7.2.0",
31
31
  "@types/progress": "^2.0.5",