@abaplint/transpiler-cli 2.7.105 → 2.7.107
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 +29 -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,26 @@ class MethodImplementationTranspiler {
|
|
|
77847
77854
|
if (unique === "") {
|
|
77848
77855
|
unique = "INPUT";
|
|
77849
77856
|
}
|
|
77850
|
-
|
|
77851
|
-
const
|
|
77852
|
-
|
|
77853
|
-
|
|
77854
|
-
|
|
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
|
+
const isOptional = methodDef === null || methodDef === void 0 ? void 0 : methodDef.getOptional().includes(varName.toUpperCase());
|
|
77859
|
+
if ((identifier.getMeta().includes("pass_by_value" /* abaplint.IdentifierMeta.PassByValue */) || isOptional)
|
|
77860
|
+
&& identifier.getType().isGeneric() === false) {
|
|
77861
|
+
after += "let " + varName + " = " + new transpile_types_1.TranspileTypes().toType(identifier.getType()) + ";\n";
|
|
77860
77862
|
after += "if (" + unique + " && " + unique + "." + varName + ") {" + varName + ".set(" + unique + "." + varName + ");}\n";
|
|
77861
77863
|
}
|
|
77862
77864
|
else {
|
|
77863
|
-
after += "
|
|
77865
|
+
after += "let " + varName + " = " + unique + "?." + varName + ";\n";
|
|
77864
77866
|
}
|
|
77865
|
-
|
|
77867
|
+
/*
|
|
77868
|
+
after = after + new TranspileTypes().declare(identifier) + "\n";
|
|
77869
|
+
const type = identifier.getType();
|
|
77870
|
+
if (identifier.getMeta().includes(abaplint.IdentifierMeta.MethodImporting)
|
|
77871
|
+
&& type.isGeneric() === false) {
|
|
77872
|
+
after += "if (" + unique + " && " + unique + "." + varName + ") {" + varName + ".set(" + unique + "." + varName + ");}\n";
|
|
77873
|
+
} else {
|
|
77874
|
+
after += "if (" + unique + " && " + unique + "." + varName + ") {" + varName + " = " + unique + "." + varName + ";}\n";
|
|
77875
|
+
}
|
|
77876
|
+
*/
|
|
77866
77877
|
if (parameterDefault) {
|
|
77867
77878
|
let val = "";
|
|
77868
77879
|
if (parameterDefault.get() instanceof abaplint.Expressions.Constant) {
|
|
@@ -81211,6 +81222,7 @@ exports.WhileTranspiler = WhileTranspiler;
|
|
|
81211
81222
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
81212
81223
|
exports.TranspileTypes = void 0;
|
|
81213
81224
|
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
81225
|
+
// todo: change this class to static for performance?
|
|
81214
81226
|
class TranspileTypes {
|
|
81215
81227
|
declare(t) {
|
|
81216
81228
|
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.107",
|
|
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.107",
|
|
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
|
}
|