@abaplint/transpiler-cli 2.7.23 → 2.7.25
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 +71 -12
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -20561,6 +20561,7 @@ class TypeUtils {
|
|
|
20561
20561
|
else if (type instanceof basic_1.XStringType
|
|
20562
20562
|
|| type instanceof basic_1.HexType
|
|
20563
20563
|
|| type instanceof basic_1.VoidType
|
|
20564
|
+
|| type instanceof basic_1.XGenericType
|
|
20564
20565
|
|| type instanceof basic_1.XSequenceType
|
|
20565
20566
|
|| type instanceof basic_1.AnyType
|
|
20566
20567
|
|| type instanceof basic_1.UnknownType) {
|
|
@@ -20903,7 +20904,7 @@ class BasicTypes {
|
|
|
20903
20904
|
}
|
|
20904
20905
|
lookupQualifiedName(name) {
|
|
20905
20906
|
var _a;
|
|
20906
|
-
// argh, todo, rewrite this entire method, more argh
|
|
20907
|
+
// argh, todo, rewrite this entire method, more argh, again argh
|
|
20907
20908
|
if (name === undefined) {
|
|
20908
20909
|
return undefined;
|
|
20909
20910
|
}
|
|
@@ -20924,7 +20925,10 @@ class BasicTypes {
|
|
|
20924
20925
|
const stru = oo.getTypeDefinitions().getByName(subTypeName);
|
|
20925
20926
|
const struType = stru === null || stru === void 0 ? void 0 : stru.getType();
|
|
20926
20927
|
if (stru && struType instanceof basic_1.StructureType) {
|
|
20927
|
-
|
|
20928
|
+
let f = struType.getComponentByName(fieldName);
|
|
20929
|
+
if (split[2] && f instanceof basic_1.StructureType) {
|
|
20930
|
+
f = f.getComponentByName(split[2]);
|
|
20931
|
+
}
|
|
20928
20932
|
if (f) {
|
|
20929
20933
|
return new _typed_identifier_1.TypedIdentifier(stru.getToken(), stru.getFilename(), f);
|
|
20930
20934
|
}
|
|
@@ -20946,7 +20950,10 @@ class BasicTypes {
|
|
|
20946
20950
|
if (type) {
|
|
20947
20951
|
const stru = type.getType();
|
|
20948
20952
|
if (stru instanceof basic_1.StructureType) {
|
|
20949
|
-
|
|
20953
|
+
let f = stru.getComponentByName(fieldName);
|
|
20954
|
+
if (split[2] && f instanceof basic_1.StructureType) {
|
|
20955
|
+
f = f.getComponentByName(split[2]);
|
|
20956
|
+
}
|
|
20950
20957
|
if (f) {
|
|
20951
20958
|
return new _typed_identifier_1.TypedIdentifier(type.getToken(), type.getFilename(), f);
|
|
20952
20959
|
}
|
|
@@ -23752,6 +23759,9 @@ class MethodParam {
|
|
|
23752
23759
|
if (concat === "TYPE C" || concat.startsWith("TYPE C ")) {
|
|
23753
23760
|
return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new cgeneric_type_1.CGenericType(), meta);
|
|
23754
23761
|
}
|
|
23762
|
+
else if (concat === "TYPE X" || concat.startsWith("TYPE X ")) {
|
|
23763
|
+
return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new basic_1.XGenericType(), meta);
|
|
23764
|
+
}
|
|
23755
23765
|
const found = new basic_types_1.BasicTypes(filename, scope).parseType(type);
|
|
23756
23766
|
if (found) {
|
|
23757
23767
|
return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, found, meta);
|
|
@@ -33761,7 +33771,7 @@ class HexType extends _abstract_type_1.AbstractType {
|
|
|
33761
33771
|
constructor(length, qualifiedName) {
|
|
33762
33772
|
super({ qualifiedName: qualifiedName });
|
|
33763
33773
|
if (length <= 0) {
|
|
33764
|
-
throw new Error("Bad
|
|
33774
|
+
throw new Error("Bad LENGTH, Hex");
|
|
33765
33775
|
}
|
|
33766
33776
|
this.length = length;
|
|
33767
33777
|
}
|
|
@@ -33840,6 +33850,7 @@ __exportStar(__webpack_require__(/*! ./time_type */ "./node_modules/@abaplint/co
|
|
|
33840
33850
|
__exportStar(__webpack_require__(/*! ./unknown_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js"), exports);
|
|
33841
33851
|
__exportStar(__webpack_require__(/*! ./utc_long_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/utc_long_type.js"), exports);
|
|
33842
33852
|
__exportStar(__webpack_require__(/*! ./void_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/void_type.js"), exports);
|
|
33853
|
+
__exportStar(__webpack_require__(/*! ./xgeneric_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/xgeneric_type.js"), exports);
|
|
33843
33854
|
__exportStar(__webpack_require__(/*! ./xsequence_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/xsequence_type.js"), exports);
|
|
33844
33855
|
__exportStar(__webpack_require__(/*! ./xstring_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/xstring_type.js"), exports);
|
|
33845
33856
|
//# sourceMappingURL=index.js.map
|
|
@@ -34480,6 +34491,39 @@ exports.VoidType = VoidType;
|
|
|
34480
34491
|
|
|
34481
34492
|
/***/ }),
|
|
34482
34493
|
|
|
34494
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/types/basic/xgeneric_type.js":
|
|
34495
|
+
/*!*********************************************************************************!*\
|
|
34496
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/types/basic/xgeneric_type.js ***!
|
|
34497
|
+
\*********************************************************************************/
|
|
34498
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
34499
|
+
|
|
34500
|
+
"use strict";
|
|
34501
|
+
|
|
34502
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
34503
|
+
exports.XGenericType = void 0;
|
|
34504
|
+
const _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js");
|
|
34505
|
+
class XGenericType extends _abstract_type_1.AbstractType {
|
|
34506
|
+
toText() {
|
|
34507
|
+
return "```x```";
|
|
34508
|
+
}
|
|
34509
|
+
isGeneric() {
|
|
34510
|
+
return true;
|
|
34511
|
+
}
|
|
34512
|
+
toABAP() {
|
|
34513
|
+
throw new Error("x, generic");
|
|
34514
|
+
}
|
|
34515
|
+
containsVoid() {
|
|
34516
|
+
return false;
|
|
34517
|
+
}
|
|
34518
|
+
toCDS() {
|
|
34519
|
+
return "abap.TODO_CGENERIC";
|
|
34520
|
+
}
|
|
34521
|
+
}
|
|
34522
|
+
exports.XGenericType = XGenericType;
|
|
34523
|
+
//# sourceMappingURL=xgeneric_type.js.map
|
|
34524
|
+
|
|
34525
|
+
/***/ }),
|
|
34526
|
+
|
|
34483
34527
|
/***/ "./node_modules/@abaplint/core/build/src/abap/types/basic/xsequence_type.js":
|
|
34484
34528
|
/*!**********************************************************************************!*\
|
|
34485
34529
|
!*** ./node_modules/@abaplint/core/build/src/abap/types/basic/xsequence_type.js ***!
|
|
@@ -47405,7 +47449,7 @@ class Registry {
|
|
|
47405
47449
|
}
|
|
47406
47450
|
static abaplintVersion() {
|
|
47407
47451
|
// magic, see build script "version.sh"
|
|
47408
|
-
return "2.101.
|
|
47452
|
+
return "2.101.16";
|
|
47409
47453
|
}
|
|
47410
47454
|
getDDICReferences() {
|
|
47411
47455
|
return this.ddicReferences;
|
|
@@ -48046,7 +48090,9 @@ const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */
|
|
|
48046
48090
|
const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
|
|
48047
48091
|
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
48048
48092
|
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
48093
|
+
const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
48049
48094
|
const __1 = __webpack_require__(/*! .. */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
48095
|
+
const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
|
|
48050
48096
|
class AlignParametersConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
48051
48097
|
}
|
|
48052
48098
|
exports.AlignParametersConf = AlignParametersConf;
|
|
@@ -48073,7 +48119,8 @@ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-par
|
|
|
48073
48119
|
|
|
48074
48120
|
Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
|
|
48075
48121
|
|
|
48076
|
-
|
|
48122
|
+
If parameters are on the same row, no issues are reported, see
|
|
48123
|
+
https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
|
|
48077
48124
|
tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide],
|
|
48078
48125
|
badExample: `CALL FUNCTION 'FOOBAR'
|
|
48079
48126
|
EXPORTING
|
|
@@ -48136,16 +48183,28 @@ DATA(sdf) = VALUE type(
|
|
|
48136
48183
|
return undefined;
|
|
48137
48184
|
}
|
|
48138
48185
|
let expectedEqualsColumn = 0;
|
|
48186
|
+
let row = 0;
|
|
48139
48187
|
for (const p of candidate.parameters) {
|
|
48140
48188
|
const currentCol = p.left.getLastToken().getCol() + p.left.getLastToken().getStr().length + 1;
|
|
48189
|
+
if (p.eq.getRow() === row) {
|
|
48190
|
+
return undefined;
|
|
48191
|
+
}
|
|
48192
|
+
row = p.eq.getRow();
|
|
48141
48193
|
if (currentCol > expectedEqualsColumn) {
|
|
48142
48194
|
expectedEqualsColumn = currentCol;
|
|
48143
48195
|
}
|
|
48144
48196
|
}
|
|
48145
48197
|
for (const p of candidate.parameters) {
|
|
48146
48198
|
if (p.eq.getCol() !== expectedEqualsColumn) {
|
|
48199
|
+
let fix;
|
|
48200
|
+
if (p.eq.getCol() < expectedEqualsColumn) {
|
|
48201
|
+
fix = edit_helper_1.EditHelper.insertAt(file, p.eq, " ".repeat(expectedEqualsColumn - p.eq.getCol()));
|
|
48202
|
+
}
|
|
48203
|
+
else {
|
|
48204
|
+
fix = edit_helper_1.EditHelper.deleteRange(file, new position_1.Position(p.eq.getRow(), expectedEqualsColumn), p.eq);
|
|
48205
|
+
}
|
|
48147
48206
|
const message = "Align parameters to column " + expectedEqualsColumn;
|
|
48148
|
-
return issue_1.Issue.atPosition(file, p.eq, message, this.getMetadata().key, this.getConfig().severity);
|
|
48207
|
+
return issue_1.Issue.atPosition(file, p.eq, message, this.getMetadata().key, this.getConfig().severity, fix);
|
|
48149
48208
|
}
|
|
48150
48209
|
}
|
|
48151
48210
|
return undefined;
|
|
@@ -55938,11 +55997,11 @@ DATA lt_bar TYPE STANDARD TABLE OF ty.`,
|
|
|
55938
55997
|
const concat = tt.concatTokens().toUpperCase();
|
|
55939
55998
|
if (concat.includes("TYPE TABLE OF")) {
|
|
55940
55999
|
const message = "Specify table type";
|
|
55941
|
-
issues.push(issue_1.Issue.
|
|
56000
|
+
issues.push(issue_1.Issue.atPosition(file, tt.getFirstToken().getStart(), message, this.getMetadata().key, this.conf.severity));
|
|
55942
56001
|
}
|
|
55943
56002
|
else if (concat.includes(" WITH ") === false && concat.includes(" RANGE OF ") === false) {
|
|
55944
56003
|
const message = "Specify table key";
|
|
55945
|
-
issues.push(issue_1.Issue.
|
|
56004
|
+
issues.push(issue_1.Issue.atPosition(file, tt.getFirstToken().getStart(), message, this.getMetadata().key, this.conf.severity));
|
|
55946
56005
|
}
|
|
55947
56006
|
}
|
|
55948
56007
|
return issues;
|
|
@@ -63722,7 +63781,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
63722
63781
|
exports.SelectSingleFullKey = exports.SelectSingleFullKeyConf = void 0;
|
|
63723
63782
|
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
63724
63783
|
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
63725
|
-
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
63726
63784
|
const __1 = __webpack_require__(/*! .. */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
63727
63785
|
class SelectSingleFullKeyConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
63728
63786
|
constructor() {
|
|
@@ -63742,7 +63800,7 @@ class SelectSingleFullKey {
|
|
|
63742
63800
|
shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
|
|
63743
63801
|
extendedInformation: `Table definitions must be known, ie. inside the errorNamespace`,
|
|
63744
63802
|
pseudoComment: "EC CI_NOORDER",
|
|
63745
|
-
tags: [
|
|
63803
|
+
tags: [],
|
|
63746
63804
|
};
|
|
63747
63805
|
}
|
|
63748
63806
|
initialize(reg) {
|
|
@@ -79410,7 +79468,8 @@ class TranspileTypes {
|
|
|
79410
79468
|
extra = "{qualifiedName: \"" + ((_j = type.getQualifiedName()) === null || _j === void 0 ? void 0 : _j.toUpperCase()) + "\"}";
|
|
79411
79469
|
}
|
|
79412
79470
|
}
|
|
79413
|
-
else if (type instanceof abaplint.BasicTypes.XSequenceType
|
|
79471
|
+
else if (type instanceof abaplint.BasicTypes.XSequenceType
|
|
79472
|
+
|| type instanceof abaplint.BasicTypes.XGenericType) {
|
|
79414
79473
|
// if not supplied itsa a Hex(1)
|
|
79415
79474
|
resolved = "Hex";
|
|
79416
79475
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.25",
|
|
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.25",
|
|
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.2.5",
|
|
34
|
-
"@abaplint/core": "^2.101.
|
|
34
|
+
"@abaplint/core": "^2.101.16",
|
|
35
35
|
"progress": "^2.0.3",
|
|
36
36
|
"webpack": "^5.86.0",
|
|
37
37
|
"webpack-cli": "^5.1.4",
|