@abaplint/transpiler 2.8.24 → 2.8.26
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.
- package/build/src/index.js +4 -4
- package/build/src/unit_test.js +9 -8
- package/package.json +3 -3
package/build/src/index.js
CHANGED
|
@@ -53,12 +53,12 @@ class Transpiler {
|
|
|
53
53
|
progress?.set(reg.getObjectCount(false), "Building");
|
|
54
54
|
for (const obj of reg.getObjects()) {
|
|
55
55
|
await progress?.tick("Building, " + obj.getName());
|
|
56
|
-
if (obj instanceof abaplint.
|
|
57
|
-
output.objects.push(...new handle_abap_1.HandleABAP(this.options).runObject(obj, reg));
|
|
58
|
-
}
|
|
59
|
-
else if (obj instanceof abaplint.Objects.TypePool) {
|
|
56
|
+
if (obj instanceof abaplint.Objects.TypePool) {
|
|
60
57
|
output.objects.push(...new handle_type_pool_1.HandleTypePool().runObject(obj, reg));
|
|
61
58
|
}
|
|
59
|
+
else if (obj instanceof abaplint.ABAPObject) {
|
|
60
|
+
output.objects.push(...new handle_abap_1.HandleABAP(this.options).runObject(obj, reg));
|
|
61
|
+
}
|
|
62
62
|
else if (obj instanceof abaplint.Objects.Oauth2Profile) {
|
|
63
63
|
output.objects.push(...new handle_oa2p_1.HandleOA2P().runObject(obj, reg));
|
|
64
64
|
}
|
package/build/src/unit_test.js
CHANGED
|
@@ -211,28 +211,29 @@ async function run() {
|
|
|
211
211
|
for (const st of this.getSortedTests(reg)) {
|
|
212
212
|
ret += `// --------------------------------------------\n`;
|
|
213
213
|
ret += ` clas = unit.addObject("${st.obj.getName()}");\n`;
|
|
214
|
+
const lc = st.localClass.toLowerCase();
|
|
214
215
|
ret += ` {
|
|
215
|
-
const {${
|
|
216
|
-
locl = clas.addTestClass("${
|
|
217
|
-
if (${
|
|
216
|
+
const {${lc}} = await import("./${this.escapeNamespace(st.obj.getName().toLowerCase())}.${st.obj.getType().toLowerCase()}.testclasses.mjs");
|
|
217
|
+
locl = clas.addTestClass("${lc}");
|
|
218
|
+
if (${lc}.class_setup) await ${lc}.class_setup();\n`;
|
|
218
219
|
for (const m of st.methods) {
|
|
219
|
-
const skipThis = (skip || []).some(a => a.object === st.obj.getName() && a.class ===
|
|
220
|
+
const skipThis = (skip || []).some(a => a.object === st.obj.getName() && a.class === lc && a.method === m);
|
|
220
221
|
if (skipThis) {
|
|
221
|
-
ret += ` console.log('${st.obj.getName()}: running ${
|
|
222
|
+
ret += ` console.log('${st.obj.getName()}: running ${lc}->${m}, skipped');\n`;
|
|
222
223
|
ret += ` meth = locl.addMethod("${m}");\n`;
|
|
223
224
|
ret += ` meth.skip();\n`;
|
|
224
225
|
continue;
|
|
225
226
|
}
|
|
226
|
-
ret += ` {\n const test = await (new ${
|
|
227
|
+
ret += ` {\n const test = await (new ${lc}()).constructor_();\n`;
|
|
227
228
|
ret += ` if (test.setup) await test.setup();\n`;
|
|
228
|
-
ret += ` console.log("${st.obj.getName()}: running ${
|
|
229
|
+
ret += ` console.log("${st.obj.getName()}: running ${lc}->${m}");\n`;
|
|
229
230
|
ret += ` meth = locl.addMethod("${m}");\n`;
|
|
230
231
|
ret += ` await test.${m}();\n`;
|
|
231
232
|
ret += ` meth.pass();\n`;
|
|
232
233
|
ret += ` if (test.teardown) await test.teardown();\n`;
|
|
233
234
|
ret += ` }\n`;
|
|
234
235
|
}
|
|
235
|
-
ret += ` if (${
|
|
236
|
+
ret += ` if (${lc}.class_teardown) await ${lc}.class_teardown();\n`;
|
|
236
237
|
ret += ` }\n`;
|
|
237
238
|
}
|
|
238
239
|
/*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.26",
|
|
4
4
|
"description": "Transpiler",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/src/index.d.ts",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"author": "abaplint",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@abaplint/core": "^2.
|
|
32
|
+
"@abaplint/core": "^2.108.12",
|
|
33
33
|
"source-map": "^0.7.4"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@types/chai": "^4.3.
|
|
36
|
+
"@types/chai": "^4.3.16",
|
|
37
37
|
"@types/mocha": "^10.0.6",
|
|
38
38
|
"chai": "^4.4.1",
|
|
39
39
|
"mocha": "^10.4.0",
|