@abaplint/cli 2.113.124 → 2.113.126
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/cli.js +38 -25
- package/package.json +4 -4
package/build/cli.js
CHANGED
|
@@ -116,7 +116,7 @@ class FileOperations {
|
|
|
116
116
|
return new core_1.MemoryFile(filename, raw);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
static
|
|
119
|
+
static setupPLimit() {
|
|
120
120
|
let concurrency = os.cpus().length;
|
|
121
121
|
if (concurrency > 8) {
|
|
122
122
|
concurrency = 8;
|
|
@@ -124,7 +124,10 @@ class FileOperations {
|
|
|
124
124
|
else if (concurrency < 1) {
|
|
125
125
|
concurrency = 1;
|
|
126
126
|
}
|
|
127
|
-
|
|
127
|
+
return pLimit(concurrency);
|
|
128
|
+
}
|
|
129
|
+
static async loadFiles(compress, input, bar) {
|
|
130
|
+
const limit = this.setupPLimit();
|
|
128
131
|
input = input.filter((filename) => {
|
|
129
132
|
const base = filename.split("/").reverse()[0];
|
|
130
133
|
if (base.split(".").length <= 2) {
|
|
@@ -140,18 +143,6 @@ class FileOperations {
|
|
|
140
143
|
});
|
|
141
144
|
});
|
|
142
145
|
const files = await Promise.all(promises);
|
|
143
|
-
/*
|
|
144
|
-
for (const filename of input) {
|
|
145
|
-
bar.tick("Reading files - " + path.basename(filename));
|
|
146
|
-
|
|
147
|
-
const base = filename.split("/").reverse()[0];
|
|
148
|
-
if (base.split(".").length <= 2) {
|
|
149
|
-
continue; // not a abapGit file
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
files.push(await this.readFile(filename, compress));
|
|
153
|
-
}
|
|
154
|
-
*/
|
|
155
146
|
return files;
|
|
156
147
|
}
|
|
157
148
|
}
|
|
@@ -825,12 +816,17 @@ class Standard {
|
|
|
825
816
|
return output + " - ";
|
|
826
817
|
}
|
|
827
818
|
build(issue) {
|
|
828
|
-
|
|
819
|
+
let filename = path.normalize(issue.getFilename());
|
|
820
|
+
if (filename.startsWith("\\\\?\\")) {
|
|
821
|
+
// windows UNC path
|
|
822
|
+
filename = filename.substring(4);
|
|
823
|
+
}
|
|
824
|
+
const relativePath = path.relative(process.cwd(), filename);
|
|
829
825
|
return {
|
|
830
|
-
filename:
|
|
826
|
+
filename: relativePath + "[" + issue.getStart().getRow() + ", " + issue.getStart().getCol() + "]",
|
|
831
827
|
description: issue.getMessage() + " (" + issue.getKey() + ")",
|
|
832
828
|
startPos: issue.getStart(),
|
|
833
|
-
rawFilename:
|
|
829
|
+
rawFilename: relativePath,
|
|
834
830
|
severity: issue.getSeverity().toString(),
|
|
835
831
|
};
|
|
836
832
|
}
|
|
@@ -4410,6 +4406,8 @@ class Compare extends combi_1.Expression {
|
|
|
4410
4406
|
const inn = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), "IN", (0, combi_1.altPrio)(_1.Source, list));
|
|
4411
4407
|
const sopt = (0, combi_1.seq)("IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("SUPPLIED", "BOUND", (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("INSTANCE OF", _1.ClassName), version_1.Version.OpenABAP), "REQUESTED", "INITIAL"));
|
|
4412
4408
|
const between = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), "BETWEEN", _1.Source, "AND", _1.Source);
|
|
4409
|
+
// https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abennews-740_sp08-expressions.htm
|
|
4410
|
+
// but also seems to work in v740sp05, blah
|
|
4413
4411
|
const predicate = (0, combi_1.ver)(version_1.Version.v740sp08, _1.MethodCallChain);
|
|
4414
4412
|
const rett = (0, combi_1.seq)(_1.Source, (0, combi_1.altPrio)((0, combi_1.seq)(_1.CompareOperator, _1.Source), inn, between, sopt));
|
|
4415
4413
|
const fsassign = (0, combi_1.seq)(_1.SourceFieldSymbolChain, "IS", (0, combi_1.optPrio)("NOT"), "ASSIGNED");
|
|
@@ -7961,10 +7959,11 @@ exports.SQLAggregation = SQLAggregation;
|
|
|
7961
7959
|
|
|
7962
7960
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7963
7961
|
exports.SQLAliasField = void 0;
|
|
7962
|
+
const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
7964
7963
|
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
7965
7964
|
class SQLAliasField extends combi_1.Expression {
|
|
7966
7965
|
getRunnable() {
|
|
7967
|
-
return (0, combi_1.regex)(/^(\/\w+\/)?\w+~(\/\w+\/)?\w+$/);
|
|
7966
|
+
return (0, combi_1.seq)((0, combi_1.regex)(/^(\/\w+\/)?\w+~(\/\w+\/)?\w+$/), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^\w+$/))));
|
|
7968
7967
|
}
|
|
7969
7968
|
}
|
|
7970
7969
|
exports.SQLAliasField = SQLAliasField;
|
|
@@ -8822,7 +8821,7 @@ class SQLSource extends combi_1.Expression {
|
|
|
8822
8821
|
getRunnable() {
|
|
8823
8822
|
const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
8824
8823
|
const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(_1.SimpleSource3, paren)));
|
|
8825
|
-
return (0, combi_1.
|
|
8824
|
+
return (0, combi_1.altPrio)(_1.SQLAliasField, _1.SimpleSource3, at);
|
|
8826
8825
|
}
|
|
8827
8826
|
}
|
|
8828
8827
|
exports.SQLSource = SQLSource;
|
|
@@ -19364,9 +19363,10 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
19364
19363
|
exports.DynproLoop = void 0;
|
|
19365
19364
|
const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
19366
19365
|
const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js");
|
|
19366
|
+
const chain_1 = __webpack_require__(/*! ./chain */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/chain.js");
|
|
19367
19367
|
class DynproLoop {
|
|
19368
19368
|
getMatcher() {
|
|
19369
|
-
return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.DynproLoop), (0, _combi_1.star)((0, _combi_1.sta)(Statements.Module)), (0, _combi_1.sta)(Statements.EndLoop));
|
|
19369
|
+
return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.DynproLoop), (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sub)(chain_1.Chain))), (0, _combi_1.sta)(Statements.EndLoop));
|
|
19370
19370
|
}
|
|
19371
19371
|
}
|
|
19372
19372
|
exports.DynproLoop = DynproLoop;
|
|
@@ -19879,9 +19879,10 @@ const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./n
|
|
|
19879
19879
|
const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js");
|
|
19880
19880
|
const chain_1 = __webpack_require__(/*! ./chain */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/chain.js");
|
|
19881
19881
|
const loop_1 = __webpack_require__(/*! ./loop */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/loop.js");
|
|
19882
|
+
const dynpro_loop_1 = __webpack_require__(/*! ./dynpro_loop */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/dynpro_loop.js");
|
|
19882
19883
|
class ProcessAfterInput {
|
|
19883
19884
|
getMatcher() {
|
|
19884
|
-
const pai = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(chain_1.Chain), (0, _combi_1.sub)(loop_1.Loop)));
|
|
19885
|
+
const pai = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(chain_1.Chain), (0, _combi_1.sub)(dynpro_loop_1.DynproLoop), (0, _combi_1.sub)(loop_1.Loop)));
|
|
19885
19886
|
return (0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessAfterInput), pai);
|
|
19886
19887
|
}
|
|
19887
19888
|
}
|
|
@@ -22475,6 +22476,19 @@ class CurrentScope {
|
|
|
22475
22476
|
}
|
|
22476
22477
|
return false;
|
|
22477
22478
|
}
|
|
22479
|
+
isAnyOO() {
|
|
22480
|
+
let curr = this.current;
|
|
22481
|
+
while (curr !== undefined) {
|
|
22482
|
+
const stype = curr.getIdentifier().stype;
|
|
22483
|
+
if (stype === _scope_type_1.ScopeType.ClassDefinition
|
|
22484
|
+
|| stype === _scope_type_1.ScopeType.ClassImplementation
|
|
22485
|
+
|| stype === _scope_type_1.ScopeType.Interface) {
|
|
22486
|
+
return true;
|
|
22487
|
+
}
|
|
22488
|
+
curr = curr.getParent();
|
|
22489
|
+
}
|
|
22490
|
+
return false;
|
|
22491
|
+
}
|
|
22478
22492
|
isGlobalOO() {
|
|
22479
22493
|
return this.parentObj.getType() === "INTF" || this.parentObj.getType() === "CLAS";
|
|
22480
22494
|
}
|
|
@@ -23893,7 +23907,7 @@ class BasicTypes {
|
|
|
23893
23907
|
if (type === undefined) {
|
|
23894
23908
|
type = (_a = this.input.scope.getDDIC().lookupNoVoid(name)) === null || _a === void 0 ? void 0 : _a.type;
|
|
23895
23909
|
}
|
|
23896
|
-
if (type === undefined && this.input.scope.
|
|
23910
|
+
if (type === undefined && this.input.scope.isAnyOO() === false && this.input.scope.getDDIC().inErrorNamespace(name) === false) {
|
|
23897
23911
|
this.input.scope.addReference(chain.getChildren()[0].getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.input.filename);
|
|
23898
23912
|
return new Types.VoidType(name);
|
|
23899
23913
|
}
|
|
@@ -25464,7 +25478,6 @@ class DataDefinition {
|
|
|
25464
25478
|
}
|
|
25465
25479
|
}
|
|
25466
25480
|
if (name) {
|
|
25467
|
-
console.dir("undef");
|
|
25468
25481
|
return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), input.filename, new basic_1.UnknownType("DataDefinition, fallback"));
|
|
25469
25482
|
}
|
|
25470
25483
|
return undefined;
|
|
@@ -54230,7 +54243,7 @@ class Registry {
|
|
|
54230
54243
|
}
|
|
54231
54244
|
static abaplintVersion() {
|
|
54232
54245
|
// magic, see build script "version.sh"
|
|
54233
|
-
return "2.113.
|
|
54246
|
+
return "2.113.126";
|
|
54234
54247
|
}
|
|
54235
54248
|
getDDICReferences() {
|
|
54236
54249
|
return this.ddicReferences;
|
|
@@ -76952,7 +76965,7 @@ class XMLConsistency {
|
|
|
76952
76965
|
issues.push(issue_1.Issue.atRow(file, 1, "Class matching XML name not found in ABAP file", this.getMetadata().key, this.conf.severity));
|
|
76953
76966
|
}
|
|
76954
76967
|
}
|
|
76955
|
-
if (obj instanceof Objects.Interface) {
|
|
76968
|
+
else if (obj instanceof Objects.Interface) {
|
|
76956
76969
|
const name = obj.getNameFromXML();
|
|
76957
76970
|
if (name === undefined) {
|
|
76958
76971
|
issues.push(issue_1.Issue.atRow(file, 1, "Name undefined in XML", this.getMetadata().key, this.conf.severity));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.113.
|
|
3
|
+
"version": "2.113.126",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,16 +38,16 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.113.
|
|
41
|
+
"@abaplint/core": "^2.113.126",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|
|
45
|
-
"@types/node": "^22.15.
|
|
45
|
+
"@types/node": "^22.15.30",
|
|
46
46
|
"@types/progress": "^2.0.7",
|
|
47
47
|
"chai": "^4.5.0",
|
|
48
48
|
"p-limit": "^3.1.0",
|
|
49
49
|
"chalk": "^5.4.1",
|
|
50
|
-
"eslint": "^9.
|
|
50
|
+
"eslint": "^9.28.0",
|
|
51
51
|
"glob": "^11.0.2",
|
|
52
52
|
"json5": "^2.2.3",
|
|
53
53
|
"memfs": "^4.17.2",
|