@abaplint/transpiler-cli 2.7.85 → 2.7.87
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/bundle.js +15 -3
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -19899,6 +19899,9 @@ class CurrentScope {
|
|
|
19899
19899
|
}
|
|
19900
19900
|
return false;
|
|
19901
19901
|
}
|
|
19902
|
+
isGlobalOO() {
|
|
19903
|
+
return this.parentObj.getType() === "INTF" || this.parentObj.getType() === "CLAS";
|
|
19904
|
+
}
|
|
19902
19905
|
isTypePool() {
|
|
19903
19906
|
var _a;
|
|
19904
19907
|
return ((_a = this.current) === null || _a === void 0 ? void 0 : _a.getIdentifier().filename.endsWith(".type.abap")) === true || false;
|
|
@@ -28414,7 +28417,7 @@ class InsertInternal {
|
|
|
28414
28417
|
new fstarget_1.FSTarget().runSyntax(afterAssigning, scope, filename, sourceType);
|
|
28415
28418
|
}
|
|
28416
28419
|
}
|
|
28417
|
-
if (
|
|
28420
|
+
if (node.findDirectTokenByText("INITIAL") === undefined
|
|
28418
28421
|
&& new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, targetType) === false) {
|
|
28419
28422
|
throw new Error("Types not compatible");
|
|
28420
28423
|
}
|
|
@@ -30482,6 +30485,13 @@ class Type {
|
|
|
30482
30485
|
&& (found === null || found === void 0 ? void 0 : found.getType().containsVoid()) === false) {
|
|
30483
30486
|
throw new Error("TYPES definition cannot be generic, " + found.getName());
|
|
30484
30487
|
}
|
|
30488
|
+
if (scope.isGlobalOO() && found.getType() instanceof basic_1.PackedType) {
|
|
30489
|
+
const concat = node.concatTokens().toUpperCase();
|
|
30490
|
+
if ((concat.includes(" TYPE P ") || concat.includes(" TYPE P."))
|
|
30491
|
+
&& concat.includes(" DECIMALS ") === false) {
|
|
30492
|
+
throw new Error("Specify DECIMALS in OO context for packed");
|
|
30493
|
+
}
|
|
30494
|
+
}
|
|
30485
30495
|
return found;
|
|
30486
30496
|
}
|
|
30487
30497
|
const fallback = node.findFirstExpression(Expressions.NamespaceSimpleName);
|
|
@@ -47821,7 +47831,7 @@ class Registry {
|
|
|
47821
47831
|
}
|
|
47822
47832
|
static abaplintVersion() {
|
|
47823
47833
|
// magic, see build script "version.sh"
|
|
47824
|
-
return "2.102.
|
|
47834
|
+
return "2.102.34";
|
|
47825
47835
|
}
|
|
47826
47836
|
getDDICReferences() {
|
|
47827
47837
|
return this.ddicReferences;
|
|
@@ -78216,6 +78226,7 @@ class SelectTranspiler {
|
|
|
78216
78226
|
}
|
|
78217
78227
|
if (node.findFirstExpression(abaplint.Expressions.SQLForAllEntries)) {
|
|
78218
78228
|
const unique = unique_identifier_1.UniqueIdentifier.get();
|
|
78229
|
+
const unique2 = unique_identifier_1.UniqueIdentifier.get();
|
|
78219
78230
|
const fn = (_a = node.findFirstExpression(abaplint.Expressions.SQLForAllEntries)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(abaplint.Expressions.SQLSource);
|
|
78220
78231
|
const faeTranspiled = new expressions_1.SQLSourceTranspiler().transpile(fn, traversal).getCode();
|
|
78221
78232
|
select = select.replace(new RegExp(" " + escapeRegExp(faeTranspiled), "g"), " " + unique);
|
|
@@ -78227,8 +78238,9 @@ class SelectTranspiler {
|
|
|
78227
78238
|
const code = `if (${faeTranspiled}.array().length === 0) {
|
|
78228
78239
|
throw "FAE, todo, empty table";
|
|
78229
78240
|
} else {
|
|
78241
|
+
const ${unique2} = ${faeTranspiled}.array();
|
|
78230
78242
|
abap.statements.clear(${target});
|
|
78231
|
-
for await (const ${unique} of
|
|
78243
|
+
for await (const ${unique} of ${unique2}) {
|
|
78232
78244
|
await abap.statements.select(${target}, {select: "${select.trim()}"${extra}}, {appending: true});
|
|
78233
78245
|
}
|
|
78234
78246
|
if (!(${target} instanceof abap.types.HashedTable) && ${target}.getOptions()?.primaryKey?.type !== "SORTED") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.87",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"author": "abaplint",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@abaplint/transpiler": "^2.7.
|
|
29
|
+
"@abaplint/transpiler": "^2.7.87",
|
|
30
30
|
"@types/glob": "^7.2.0",
|
|
31
31
|
"glob": "=7.2.0",
|
|
32
32
|
"@types/progress": "^2.0.5",
|
|
33
33
|
"@types/node": "^20.5.7",
|
|
34
|
-
"@abaplint/core": "^2.102.
|
|
34
|
+
"@abaplint/core": "^2.102.34",
|
|
35
35
|
"progress": "^2.0.3",
|
|
36
36
|
"webpack": "^5.88.2",
|
|
37
37
|
"webpack-cli": "^5.1.4",
|