@abaplint/core 2.112.16 → 2.112.17

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.
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BuiltIn = exports.BuiltInMethod = void 0;
4
- /* eslint-disable max-len */
5
4
  const _typed_identifier_1 = require("../types/_typed_identifier");
6
5
  const basic_1 = require("../types/basic");
7
6
  const tokens_1 = require("../1_lexer/tokens");
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BasicTypes = void 0;
4
- /* eslint-disable default-case */
5
4
  const _typed_identifier_1 = require("../types/_typed_identifier");
6
5
  const Expressions = require("../2_statements/expressions");
7
6
  const Statements = require("../2_statements/statements");
@@ -11,22 +11,26 @@ class StatementFlow {
11
11
  this.counter = 0;
12
12
  }
13
13
  build(stru) {
14
- var _a, _b;
14
+ var _a, _b, _c;
15
15
  const ret = [];
16
- const forms = stru.findAllStructures(Structures.Form);
17
- for (const f of forms) {
18
- const formName = "FORM " + ((_a = f.findFirstExpression(Expressions.FormName)) === null || _a === void 0 ? void 0 : _a.concatTokens());
19
- this.counter = 1;
20
- const graph = this.traverseBody(this.findBody(f), { procedureEnd: "end#1" });
21
- graph.setLabel(formName);
22
- ret.push(graph);
23
- }
24
- const methods = stru.findAllStructures(Structures.Method);
25
- for (const f of methods) {
26
- const methodName = "METHOD " + ((_b = f.findFirstExpression(Expressions.MethodName)) === null || _b === void 0 ? void 0 : _b.concatTokens());
16
+ const structures = stru.findAllStructuresMulti([Structures.Form, Structures.Method, Structures.FunctionModule]);
17
+ for (const s of structures) {
18
+ let name = "";
19
+ if (s.get() instanceof Structures.Form) {
20
+ name = "FORM " + ((_a = s.findFirstExpression(Expressions.FormName)) === null || _a === void 0 ? void 0 : _a.concatTokens());
21
+ }
22
+ else if (s.get() instanceof Structures.Method) {
23
+ name = "METHOD " + ((_b = s.findFirstExpression(Expressions.MethodName)) === null || _b === void 0 ? void 0 : _b.concatTokens());
24
+ }
25
+ else if (s.get() instanceof Structures.FunctionModule) {
26
+ name = "FUNCTION " + ((_c = s.findFirstExpression(Expressions.Field)) === null || _c === void 0 ? void 0 : _c.concatTokens());
27
+ }
28
+ else {
29
+ throw new Error("StatementFlow, unknown structure");
30
+ }
27
31
  this.counter = 1;
28
- const graph = this.traverseBody(this.findBody(f), { procedureEnd: "end#1" });
29
- graph.setLabel(methodName);
32
+ const graph = this.traverseBody(this.findBody(s), { procedureEnd: "end#1" });
33
+ graph.setLabel(name);
30
34
  ret.push(graph);
31
35
  }
32
36
  return ret.map(f => f.reduce());
@@ -11,7 +11,7 @@ class CharacterType extends _abstract_type_1.AbstractType {
11
11
  this.length = length;
12
12
  }
13
13
  cloneType(input) {
14
- const clone = Object.assign({}, this.getAbstractTypeData()) || {};
14
+ const clone = Object.assign({}, this.getAbstractTypeData());
15
15
  if (input.qualifiedName) {
16
16
  clone.qualifiedName = input.qualifiedName;
17
17
  }
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.112.16";
70
+ return "2.112.17";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -18,7 +18,6 @@ class CDSLegacyView {
18
18
  key: "cds_legacy_view",
19
19
  title: "CDS Legacy View",
20
20
  shortDescription: `Identify CDS Legacy Views`,
21
- // eslint-disable-next-line max-len
22
21
  extendedInformation: `Use DEFINE VIEW ENTITY instead of DEFINE VIEW
23
22
 
24
23
  https://blogs.sap.com/2021/10/16/a-new-generation-of-cds-views-how-to-migrate-your-cds-views-to-cds-view-entities/
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.112.16",
3
+ "version": "2.112.17",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
7
7
  "funding": "https://github.com/sponsors/larshp",
8
8
  "scripts": {
9
- "lint": "eslint src/**/*.ts test/**/*.ts --format unix",
10
- "lint:fix": "eslint src/**/*.ts test/**/*.ts --format unix --fix",
9
+ "lint": "eslint src/**/*.ts test/**/*.ts",
10
+ "lint:fix": "eslint src/**/*.ts test/**/*.ts --fix",
11
11
  "compile": "tsc && sh scripts/version.sh",
12
12
  "test": "npm run compile && mocha --timeout 1000 && npm run lint && npm run schema && api-extractor run",
13
13
  "test:only": "npm run compile && mocha --timeout 1000000",
@@ -50,12 +50,12 @@
50
50
  },
51
51
  "homepage": "https://abaplint.org",
52
52
  "devDependencies": {
53
- "@microsoft/api-extractor": "^7.47.5",
53
+ "@microsoft/api-extractor": "^7.47.6",
54
54
  "@types/chai": "^4.3.17",
55
55
  "@types/mocha": "^10.0.7",
56
56
  "@types/node": "^22.2.0",
57
57
  "chai": "^4.5.0",
58
- "eslint": "^8.57.0",
58
+ "eslint": "^9.9.0",
59
59
  "mocha": "^10.7.3",
60
60
  "c8": "^10.1.2",
61
61
  "source-map-support": "^0.5.21",