@abaplint/transpiler-cli 2.7.105 → 2.7.106
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 +28 -17
- package/package.json +5 -5
package/build/bundle.js
CHANGED
|
@@ -48258,7 +48258,7 @@ class Registry {
|
|
|
48258
48258
|
}
|
|
48259
48259
|
static abaplintVersion() {
|
|
48260
48260
|
// magic, see build script "version.sh"
|
|
48261
|
-
return "2.102.
|
|
48261
|
+
return "2.102.58";
|
|
48262
48262
|
}
|
|
48263
48263
|
getDDICReferences() {
|
|
48264
48264
|
return this.ddicReferences;
|
|
@@ -64718,6 +64718,10 @@ const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modu
|
|
|
64718
64718
|
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
64719
64719
|
const basic_1 = __webpack_require__(/*! ../abap/types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
64720
64720
|
class SelectAddOrderByConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
64721
|
+
constructor() {
|
|
64722
|
+
super(...arguments);
|
|
64723
|
+
this.skipForAllEntries = false;
|
|
64724
|
+
}
|
|
64721
64725
|
}
|
|
64722
64726
|
exports.SelectAddOrderByConf = SelectAddOrderByConf;
|
|
64723
64727
|
class SelectAddOrderBy {
|
|
@@ -64749,7 +64753,7 @@ If the target is a sorted/hashed table, no issue is reported`,
|
|
|
64749
64753
|
this.conf = conf;
|
|
64750
64754
|
}
|
|
64751
64755
|
run(obj) {
|
|
64752
|
-
var _a;
|
|
64756
|
+
var _a, _b;
|
|
64753
64757
|
const issues = [];
|
|
64754
64758
|
if (!(obj instanceof _abap_object_1.ABAPObject) || obj.getType() === "INTF") {
|
|
64755
64759
|
return [];
|
|
@@ -64763,13 +64767,16 @@ If the target is a sorted/hashed table, no issue is reported`,
|
|
|
64763
64767
|
const selects = stru.findAllStatements(Statements.Select);
|
|
64764
64768
|
selects.push(...stru.findAllStatements(Statements.SelectLoop));
|
|
64765
64769
|
for (const s of selects) {
|
|
64766
|
-
const
|
|
64767
|
-
if (
|
|
64770
|
+
const concat = s.concatTokens().toUpperCase();
|
|
64771
|
+
if (concat.startsWith("SELECT SINGLE ")) {
|
|
64772
|
+
continue;
|
|
64773
|
+
}
|
|
64774
|
+
else if (((_a = this.getConfig()) === null || _a === void 0 ? void 0 : _a.skipForAllEntries) === true && concat.includes(" FOR ALL ENTRIES ")) {
|
|
64768
64775
|
continue;
|
|
64769
64776
|
}
|
|
64770
64777
|
// skip COUNT(*)
|
|
64771
64778
|
const list = s.findAllExpressions(Expressions.SQLField);
|
|
64772
|
-
if (list.length === 1 && ((
|
|
64779
|
+
if (list.length === 1 && ((_b = list[0].getFirstChild()) === null || _b === void 0 ? void 0 : _b.get()) instanceof Expressions.SQLAggregation) {
|
|
64773
64780
|
continue;
|
|
64774
64781
|
}
|
|
64775
64782
|
else if (s.findFirstExpression(Expressions.SQLOrderBy)) {
|
|
@@ -77847,22 +77854,25 @@ class MethodImplementationTranspiler {
|
|
|
77847
77854
|
if (unique === "") {
|
|
77848
77855
|
unique = "INPUT";
|
|
77849
77856
|
}
|
|
77850
|
-
|
|
77851
|
-
|
|
77852
|
-
|
|
77853
|
-
|
|
77854
|
-
&& type.getLength() === 1
|
|
77855
|
-
&& type.getDDICName() === undefined
|
|
77856
|
-
&& type.getQualifiedName() === undefined;
|
|
77857
|
-
if (identifier.getMeta().includes("importing" /* abaplint.IdentifierMeta.MethodImporting */)
|
|
77858
|
-
&& type.isGeneric() === false
|
|
77859
|
-
&& charGeneric === false) {
|
|
77857
|
+
const parameterDefault = methodDef === null || methodDef === void 0 ? void 0 : methodDef.getParameterDefault(varName);
|
|
77858
|
+
if (identifier.getMeta().includes("pass_by_value" /* abaplint.IdentifierMeta.PassByValue */)
|
|
77859
|
+
&& identifier.getType().isGeneric() === false) {
|
|
77860
|
+
after += "let " + varName + " = " + new transpile_types_1.TranspileTypes().toType(identifier.getType()) + ";\n";
|
|
77860
77861
|
after += "if (" + unique + " && " + unique + "." + varName + ") {" + varName + ".set(" + unique + "." + varName + ");}\n";
|
|
77861
77862
|
}
|
|
77862
77863
|
else {
|
|
77863
|
-
after += "
|
|
77864
|
+
after += "let " + varName + " = " + unique + "?." + varName + ";\n";
|
|
77864
77865
|
}
|
|
77865
|
-
|
|
77866
|
+
/*
|
|
77867
|
+
after = after + new TranspileTypes().declare(identifier) + "\n";
|
|
77868
|
+
const type = identifier.getType();
|
|
77869
|
+
if (identifier.getMeta().includes(abaplint.IdentifierMeta.MethodImporting)
|
|
77870
|
+
&& type.isGeneric() === false) {
|
|
77871
|
+
after += "if (" + unique + " && " + unique + "." + varName + ") {" + varName + ".set(" + unique + "." + varName + ");}\n";
|
|
77872
|
+
} else {
|
|
77873
|
+
after += "if (" + unique + " && " + unique + "." + varName + ") {" + varName + " = " + unique + "." + varName + ";}\n";
|
|
77874
|
+
}
|
|
77875
|
+
*/
|
|
77866
77876
|
if (parameterDefault) {
|
|
77867
77877
|
let val = "";
|
|
77868
77878
|
if (parameterDefault.get() instanceof abaplint.Expressions.Constant) {
|
|
@@ -81211,6 +81221,7 @@ exports.WhileTranspiler = WhileTranspiler;
|
|
|
81211
81221
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
81212
81222
|
exports.TranspileTypes = void 0;
|
|
81213
81223
|
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
81224
|
+
// todo: change this class to static for performance?
|
|
81214
81225
|
class TranspileTypes {
|
|
81215
81226
|
declare(t) {
|
|
81216
81227
|
const type = t.getType();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.106",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"author": "abaplint",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@abaplint/transpiler": "^2.7.
|
|
29
|
+
"@abaplint/transpiler": "^2.7.106",
|
|
30
30
|
"@types/glob": "^7.2.0",
|
|
31
31
|
"glob": "=7.2.0",
|
|
32
32
|
"@types/progress": "^2.0.5",
|
|
33
|
-
"@types/node": "^20.8.
|
|
34
|
-
"@abaplint/core": "^2.102.
|
|
33
|
+
"@types/node": "^20.8.6",
|
|
34
|
+
"@abaplint/core": "^2.102.58",
|
|
35
35
|
"progress": "^2.0.3",
|
|
36
|
-
"webpack": "^5.
|
|
36
|
+
"webpack": "^5.89.0",
|
|
37
37
|
"webpack-cli": "^5.1.4",
|
|
38
38
|
"typescript": "^5.2.2"
|
|
39
39
|
}
|