@abaplint/transpiler-cli 2.6.41 → 2.6.42
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 +61 -24
- package/package.json +5 -5
package/build/bundle.js
CHANGED
|
@@ -32978,7 +32978,7 @@ class CharacterType extends _abstract_type_1.AbstractType {
|
|
|
32978
32978
|
constructor(length, extra) {
|
|
32979
32979
|
super(extra);
|
|
32980
32980
|
if (length <= 0) {
|
|
32981
|
-
throw new Error("Bad LENGTH");
|
|
32981
|
+
throw new Error("Bad LENGTH, Character");
|
|
32982
32982
|
}
|
|
32983
32983
|
this.length = length;
|
|
32984
32984
|
}
|
|
@@ -33349,7 +33349,7 @@ class FloatingPointType extends _abstract_type_1.AbstractType {
|
|
|
33349
33349
|
constructor(length, qualifiedName) {
|
|
33350
33350
|
super({ qualifiedName: qualifiedName });
|
|
33351
33351
|
if (length <= 0) {
|
|
33352
|
-
throw new Error("Bad LENGTH");
|
|
33352
|
+
throw new Error("Bad LENGTH, Floating Point");
|
|
33353
33353
|
}
|
|
33354
33354
|
this.length = length;
|
|
33355
33355
|
}
|
|
@@ -33426,7 +33426,7 @@ class HexType extends _abstract_type_1.AbstractType {
|
|
|
33426
33426
|
constructor(length, qualifiedName) {
|
|
33427
33427
|
super({ qualifiedName: qualifiedName });
|
|
33428
33428
|
if (length <= 0) {
|
|
33429
|
-
throw new Error("Bad
|
|
33429
|
+
throw new Error("Bad LENGTHm, Hex");
|
|
33430
33430
|
}
|
|
33431
33431
|
this.length = length;
|
|
33432
33432
|
}
|
|
@@ -33591,7 +33591,7 @@ class NumericType extends _abstract_type_1.AbstractType {
|
|
|
33591
33591
|
constructor(length, qualifiedName) {
|
|
33592
33592
|
super({ qualifiedName: qualifiedName });
|
|
33593
33593
|
if (length <= 0) {
|
|
33594
|
-
throw new Error("Bad LENGTH");
|
|
33594
|
+
throw new Error("Bad LENGTH, Numeric");
|
|
33595
33595
|
}
|
|
33596
33596
|
this.length = length;
|
|
33597
33597
|
}
|
|
@@ -33678,10 +33678,10 @@ class PackedType extends _abstract_type_1.AbstractType {
|
|
|
33678
33678
|
constructor(length, decimals, extra) {
|
|
33679
33679
|
super(extra);
|
|
33680
33680
|
if (length <= 0) {
|
|
33681
|
-
throw new Error("Bad LENGTH");
|
|
33681
|
+
throw new Error("Bad LENGTH, Packed");
|
|
33682
33682
|
}
|
|
33683
33683
|
else if (decimals < 0) {
|
|
33684
|
-
throw new Error("Bad DECIMALS");
|
|
33684
|
+
throw new Error("Bad DECIMALS, Packed");
|
|
33685
33685
|
}
|
|
33686
33686
|
this.length = length;
|
|
33687
33687
|
this.decimals = decimals;
|
|
@@ -36793,9 +36793,10 @@ class Config {
|
|
|
36793
36793
|
return new Config(JSON.stringify(config));
|
|
36794
36794
|
}
|
|
36795
36795
|
getEnabledRules() {
|
|
36796
|
+
var _a;
|
|
36796
36797
|
const rules = [];
|
|
36797
36798
|
for (const rule of artifacts_rules_1.ArtifactsRules.getRules()) {
|
|
36798
|
-
const ruleConfig = this.config["rules"][rule.getMetadata().key];
|
|
36799
|
+
const ruleConfig = (_a = this.config["rules"]) === null || _a === void 0 ? void 0 : _a[rule.getMetadata().key];
|
|
36799
36800
|
const ruleExists = ruleConfig !== undefined;
|
|
36800
36801
|
if (ruleExists) {
|
|
36801
36802
|
if (ruleConfig === false) { // "rule": false
|
|
@@ -44150,6 +44151,7 @@ class RenameDataElement {
|
|
|
44150
44151
|
changes = changes.concat(helper.renameDDICCodeReferences(obj, oldName, newName));
|
|
44151
44152
|
changes = changes.concat(helper.renameDDICTABLReferences(obj, oldName, newName));
|
|
44152
44153
|
changes = changes.concat(helper.renameDDICTTYPReferences(obj, oldName, newName));
|
|
44154
|
+
changes = changes.concat(helper.renameDDICAUTHReferences(obj, oldName, newName));
|
|
44153
44155
|
return {
|
|
44154
44156
|
documentChanges: changes,
|
|
44155
44157
|
};
|
|
@@ -44619,6 +44621,21 @@ class RenamerHelper {
|
|
|
44619
44621
|
}
|
|
44620
44622
|
return changes;
|
|
44621
44623
|
}
|
|
44624
|
+
renameDDICAUTHReferences(obj, oldName, newName) {
|
|
44625
|
+
const changes = [];
|
|
44626
|
+
const used = this.reg.getDDICReferences().listWhereUsed(obj);
|
|
44627
|
+
for (const u of used) {
|
|
44628
|
+
if (u.type !== "AUTH") {
|
|
44629
|
+
continue;
|
|
44630
|
+
}
|
|
44631
|
+
const tabl = this.reg.getObject(u.type, u.name);
|
|
44632
|
+
if (tabl === undefined) {
|
|
44633
|
+
continue;
|
|
44634
|
+
}
|
|
44635
|
+
changes.push(...this.buildXMLFileEdits(tabl, "ROLLNAME", oldName, newName));
|
|
44636
|
+
}
|
|
44637
|
+
return changes;
|
|
44638
|
+
}
|
|
44622
44639
|
buildXMLFileEdits(object, xmlTag, oldName, newName) {
|
|
44623
44640
|
const changes = [];
|
|
44624
44641
|
const xml = object.getXMLFile();
|
|
@@ -46612,7 +46629,7 @@ class Registry {
|
|
|
46612
46629
|
}
|
|
46613
46630
|
static abaplintVersion() {
|
|
46614
46631
|
// magic, see build script "version.sh"
|
|
46615
|
-
return "2.99.
|
|
46632
|
+
return "2.99.6";
|
|
46616
46633
|
}
|
|
46617
46634
|
getDDICReferences() {
|
|
46618
46635
|
return this.references;
|
|
@@ -48901,10 +48918,12 @@ class CheckComments extends _abap_rule_1.ABAPRule {
|
|
|
48901
48918
|
shortDescription: `
|
|
48902
48919
|
Various checks for comment usage.`,
|
|
48903
48920
|
extendedInformation: `
|
|
48904
|
-
|
|
48921
|
+
Detects end of line comments. Comments starting with "#EC" or "##" are ignored
|
|
48905
48922
|
|
|
48906
48923
|
https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,
|
|
48907
48924
|
tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
|
|
48925
|
+
badExample: `WRITE 2. " descriptive comment`,
|
|
48926
|
+
goodExample: `" descriptive comment\nWRITE 2.`,
|
|
48908
48927
|
};
|
|
48909
48928
|
}
|
|
48910
48929
|
getDescription(issueType) {
|
|
@@ -62775,6 +62794,10 @@ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./
|
|
|
62775
62794
|
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
62776
62795
|
const __1 = __webpack_require__(/*! .. */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
62777
62796
|
class SelectSingleFullKeyConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
62797
|
+
constructor() {
|
|
62798
|
+
super(...arguments);
|
|
62799
|
+
this.allowPseudo = true;
|
|
62800
|
+
}
|
|
62778
62801
|
}
|
|
62779
62802
|
exports.SelectSingleFullKeyConf = SelectSingleFullKeyConf;
|
|
62780
62803
|
class SelectSingleFullKey {
|
|
@@ -62796,6 +62819,14 @@ class SelectSingleFullKey {
|
|
|
62796
62819
|
return this;
|
|
62797
62820
|
}
|
|
62798
62821
|
getConfig() {
|
|
62822
|
+
if (this.conf === undefined) {
|
|
62823
|
+
this.conf = {
|
|
62824
|
+
allowPseudo: true,
|
|
62825
|
+
};
|
|
62826
|
+
}
|
|
62827
|
+
if (this.conf.allowPseudo === undefined) {
|
|
62828
|
+
this.conf.allowPseudo = true;
|
|
62829
|
+
}
|
|
62799
62830
|
return this.conf;
|
|
62800
62831
|
}
|
|
62801
62832
|
setConfig(conf) {
|
|
@@ -62827,7 +62858,11 @@ class SelectSingleFullKey {
|
|
|
62827
62858
|
continue;
|
|
62828
62859
|
}
|
|
62829
62860
|
const next = statements[i + 1];
|
|
62830
|
-
if ((next === null || next === void 0 ? void 0 : next.get()) instanceof __1.Comment
|
|
62861
|
+
if ((next === null || next === void 0 ? void 0 : next.get()) instanceof __1.Comment
|
|
62862
|
+
&& next.concatTokens().includes(this.getMetadata().pseudoComment + "")) {
|
|
62863
|
+
if (this.getConfig().allowPseudo !== true) {
|
|
62864
|
+
issues.push(issue_1.Issue.atStatement(file, s, "Pseudo comment not allowed", this.getMetadata().key, this.getConfig().severity));
|
|
62865
|
+
}
|
|
62831
62866
|
continue;
|
|
62832
62867
|
}
|
|
62833
62868
|
const tabl = this.findReference(databaseTable.getFirstToken().getStart(), syntax.spaghetti, file);
|
|
@@ -62836,7 +62871,6 @@ class SelectSingleFullKey {
|
|
|
62836
62871
|
continue;
|
|
62837
62872
|
}
|
|
62838
62873
|
const keys = table.listKeys(this.reg);
|
|
62839
|
-
// const type = table.parseType(this.reg);
|
|
62840
62874
|
const cond = s.findFirstExpression(__1.Expressions.SQLCond);
|
|
62841
62875
|
const set = new Set();
|
|
62842
62876
|
for (const key of keys) {
|
|
@@ -65103,6 +65137,7 @@ ENDIF.`,
|
|
|
65103
65137
|
&& !(statement.get() instanceof Statements.DataEnd)
|
|
65104
65138
|
&& !(statement.get() instanceof Statements.Type)
|
|
65105
65139
|
&& !(statement.get() instanceof Statements.Form)
|
|
65140
|
+
&& !(statement.get() instanceof Statements.Tables)
|
|
65106
65141
|
&& !(statement.get() instanceof Statements.TypeEnd)
|
|
65107
65142
|
&& !(statement.get() instanceof Statements.Constant)
|
|
65108
65143
|
&& !(statement.get() instanceof Statements.ConstantEnd)
|
|
@@ -78556,21 +78591,23 @@ class Traversal {
|
|
|
78556
78591
|
static setValues(identifier, name) {
|
|
78557
78592
|
const val = identifier.getValue();
|
|
78558
78593
|
let ret = "";
|
|
78559
|
-
|
|
78560
|
-
|
|
78561
|
-
|
|
78562
|
-
|
|
78563
|
-
|
|
78564
|
-
|
|
78565
|
-
|
|
78566
|
-
|
|
78567
|
-
|
|
78568
|
-
|
|
78594
|
+
const handle = (val, name) => {
|
|
78595
|
+
if (typeof val === "string") {
|
|
78596
|
+
const e = new expressions_1.ConstantTranspiler().escape(val);
|
|
78597
|
+
ret += name + ".set(" + e + ");\n";
|
|
78598
|
+
}
|
|
78599
|
+
else if (typeof val === "object") {
|
|
78600
|
+
const a = val;
|
|
78601
|
+
for (const v of Object.keys(val)) {
|
|
78602
|
+
const s = a[v];
|
|
78603
|
+
if (s === undefined) {
|
|
78604
|
+
continue;
|
|
78605
|
+
}
|
|
78606
|
+
handle(s, name + ".get()." + v);
|
|
78569
78607
|
}
|
|
78570
|
-
s = new expressions_1.ConstantTranspiler().escape(s);
|
|
78571
|
-
ret += name + ".get()." + v + ".set(" + s + ");\n";
|
|
78572
78608
|
}
|
|
78573
|
-
}
|
|
78609
|
+
};
|
|
78610
|
+
handle(val, name);
|
|
78574
78611
|
return ret;
|
|
78575
78612
|
}
|
|
78576
78613
|
buildInternalName(name, def) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.42",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"bin": {
|
|
6
6
|
"abap_transpile": "./abap_transpile"
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"author": "abaplint",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@abaplint/transpiler": "^2.6.
|
|
28
|
+
"@abaplint/transpiler": "^2.6.42",
|
|
29
29
|
"@types/glob": "^7.2.0",
|
|
30
30
|
"glob": "=7.2.0",
|
|
31
31
|
"@types/progress": "^2.0.5",
|
|
32
|
-
"@types/node": "^
|
|
33
|
-
"@abaplint/core": "^2.99.
|
|
32
|
+
"@types/node": "^20.0.0",
|
|
33
|
+
"@abaplint/core": "^2.99.6",
|
|
34
34
|
"progress": "^2.0.3",
|
|
35
|
-
"webpack": "^5.
|
|
35
|
+
"webpack": "^5.82.0",
|
|
36
36
|
"webpack-cli": "^5.0.2",
|
|
37
37
|
"typescript": "^5.0.4"
|
|
38
38
|
}
|