@abaplint/transpiler-cli 2.7.53 → 2.7.55

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/bundle.js +24 -3
  2. package/package.json +3 -3
package/build/bundle.js CHANGED
@@ -18302,7 +18302,12 @@ class BuiltInMethod extends _identifier_1.Identifier {
18302
18302
  this.row = row;
18303
18303
  }
18304
18304
  getRequiredParameters() {
18305
- return [];
18305
+ const ret = [];
18306
+ for (const i in this.method.mandatory) {
18307
+ const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), i);
18308
+ ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.mandatory[i]));
18309
+ }
18310
+ return ret;
18306
18311
  }
18307
18312
  getOptional() {
18308
18313
  throw new Error("BuiltInMethod->Method not implemented.");
@@ -26693,10 +26698,15 @@ const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ ".
26693
26698
  const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
26694
26699
  class ClassLocalFriends {
26695
26700
  runSyntax(node, scope, filename) {
26696
- const found = node.findDirectExpression(Expressions.ClassName);
26701
+ const classNames = node.findAllExpressions(Expressions.ClassName);
26702
+ const found = classNames[0];
26697
26703
  if (found) {
26698
26704
  const token = found.getFirstToken();
26699
26705
  const name = token.getStr();
26706
+ if (scope.getParentObj().getType() === "CLAS"
26707
+ && name.toUpperCase() !== scope.getParentObj().getName().toUpperCase()) {
26708
+ throw new Error(`Befriending must be ` + scope.getParentObj().getName().toUpperCase());
26709
+ }
26700
26710
  const def = scope.findClassDefinition(name);
26701
26711
  if (def) {
26702
26712
  scope.addReference(token, def, _reference_1.ReferenceType.ObjectOrientedReference, filename);
@@ -26705,6 +26715,14 @@ class ClassLocalFriends {
26705
26715
  throw new Error(`Class ${name.toUpperCase()} not found`);
26706
26716
  }
26707
26717
  }
26718
+ for (let i = 1; i < classNames.length; i++) {
26719
+ const className = classNames[i].concatTokens();
26720
+ // make sure to check also DEFINITION DEFERRED
26721
+ const found = scope.existsObject(className);
26722
+ if (found.found === false) {
26723
+ throw new Error(`Class ${className.toUpperCase()} not found`);
26724
+ }
26725
+ }
26708
26726
  }
26709
26727
  }
26710
26728
  exports.ClassLocalFriends = ClassLocalFriends;
@@ -47591,7 +47609,7 @@ class Registry {
47591
47609
  }
47592
47610
  static abaplintVersion() {
47593
47611
  // magic, see build script "version.sh"
47594
- return "2.102.7";
47612
+ return "2.102.8";
47595
47613
  }
47596
47614
  getDDICReferences() {
47597
47615
  return this.ddicReferences;
@@ -51510,6 +51528,9 @@ class CyclomaticComplexity {
51510
51528
  }
51511
51529
  setConfig(conf) {
51512
51530
  this.conf = conf;
51531
+ if (this.conf.max === undefined) {
51532
+ this.conf.max = new CyclomaticComplexityConf().max;
51533
+ }
51513
51534
  }
51514
51535
  initialize(_reg) {
51515
51536
  return this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.7.53",
3
+ "version": "2.7.55",
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.53",
29
+ "@abaplint/transpiler": "^2.7.55",
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.4.5",
34
- "@abaplint/core": "^2.102.7",
34
+ "@abaplint/core": "^2.102.8",
35
35
  "progress": "^2.0.3",
36
36
  "webpack": "^5.88.2",
37
37
  "webpack-cli": "^5.1.4",