@abaplint/cli 2.113.125 → 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.
Files changed (2) hide show
  1. package/build/cli.js +21 -18
  2. 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 async loadFiles(compress, input, bar) {
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
- const limit = pLimit(concurrency);
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
  }
@@ -22485,6 +22476,19 @@ class CurrentScope {
22485
22476
  }
22486
22477
  return false;
22487
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
+ }
22488
22492
  isGlobalOO() {
22489
22493
  return this.parentObj.getType() === "INTF" || this.parentObj.getType() === "CLAS";
22490
22494
  }
@@ -23903,7 +23907,7 @@ class BasicTypes {
23903
23907
  if (type === undefined) {
23904
23908
  type = (_a = this.input.scope.getDDIC().lookupNoVoid(name)) === null || _a === void 0 ? void 0 : _a.type;
23905
23909
  }
23906
- if (type === undefined && this.input.scope.isOO() === false && this.input.scope.getDDIC().inErrorNamespace(name) === false) {
23910
+ if (type === undefined && this.input.scope.isAnyOO() === false && this.input.scope.getDDIC().inErrorNamespace(name) === false) {
23907
23911
  this.input.scope.addReference(chain.getChildren()[0].getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.input.filename);
23908
23912
  return new Types.VoidType(name);
23909
23913
  }
@@ -25474,7 +25478,6 @@ class DataDefinition {
25474
25478
  }
25475
25479
  }
25476
25480
  if (name) {
25477
- console.dir("undef");
25478
25481
  return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), input.filename, new basic_1.UnknownType("DataDefinition, fallback"));
25479
25482
  }
25480
25483
  return undefined;
@@ -54240,7 +54243,7 @@ class Registry {
54240
54243
  }
54241
54244
  static abaplintVersion() {
54242
54245
  // magic, see build script "version.sh"
54243
- return "2.113.125";
54246
+ return "2.113.126";
54244
54247
  }
54245
54248
  getDDICReferences() {
54246
54249
  return this.ddicReferences;
@@ -76962,7 +76965,7 @@ class XMLConsistency {
76962
76965
  issues.push(issue_1.Issue.atRow(file, 1, "Class matching XML name not found in ABAP file", this.getMetadata().key, this.conf.severity));
76963
76966
  }
76964
76967
  }
76965
- if (obj instanceof Objects.Interface) {
76968
+ else if (obj instanceof Objects.Interface) {
76966
76969
  const name = obj.getNameFromXML();
76967
76970
  if (name === undefined) {
76968
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.125",
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.125",
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.21",
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.27.0",
50
+ "eslint": "^9.28.0",
51
51
  "glob": "^11.0.2",
52
52
  "json5": "^2.2.3",
53
53
  "memfs": "^4.17.2",