@abaplint/core 2.101.5 → 2.101.7

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.
@@ -33,6 +33,9 @@ class Raise {
33
33
  else {
34
34
  throw new Error("RAISE, unknown class " + className);
35
35
  }
36
+ if (method === undefined) {
37
+ method = new basic_1.VoidType(className);
38
+ }
36
39
  }
37
40
  const c = node.findExpressionAfterToken("EXCEPTION");
38
41
  if (c instanceof nodes_1.ExpressionNode && (c.get() instanceof Expressions.SimpleSource2 || c.get() instanceof Expressions.Source)) {
@@ -48,6 +51,9 @@ class Raise {
48
51
  throw new Error("RAISE EXCEPTION, must be object reference, got " + type.constructor.name);
49
52
  }
50
53
  }
54
+ if (method === undefined) {
55
+ method = new basic_1.VoidType("Exception");
56
+ }
51
57
  // check parameters vs constructor
52
58
  const param = node.findDirectExpression(Expressions.ParameterListS);
53
59
  if (param) {
@@ -108,7 +108,14 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
108
108
  }
109
109
  findFieldNames(tree) {
110
110
  var _a, _b;
111
- for (const e of tree.findAllExpressions(expressions_1.CDSElement)) {
111
+ let expr = tree.findFirstExpression(expressions_1.CDSSelect);
112
+ if (expr === undefined) {
113
+ expr = tree.findFirstExpression(expressions_1.CDSAnnotate);
114
+ }
115
+ if (expr === undefined) {
116
+ expr = tree.findFirstExpression(expressions_1.CDSDefineProjection);
117
+ }
118
+ for (const e of (expr === null || expr === void 0 ? void 0 : expr.findDirectExpressions(expressions_1.CDSElement)) || []) {
112
119
  let found = (_a = e.findDirectExpression(expressions_1.CDSAs)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(expressions_1.CDSName);
113
120
  if (found === undefined) {
114
121
  const list = e.findDirectExpressions(expressions_1.CDSName);
@@ -65,7 +65,7 @@ class Registry {
65
65
  }
66
66
  static abaplintVersion() {
67
67
  // magic, see build script "version.sh"
68
- return "2.101.5";
68
+ return "2.101.7";
69
69
  }
70
70
  getDDICReferences() {
71
71
  return this.ddicReferences;
@@ -154,7 +154,9 @@ Current rules:
154
154
  * ENUMs, but does not nessesarily give the correct type and value
155
155
  * MESSAGE with non simple source
156
156
 
157
- Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.`,
157
+ Only one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.
158
+
159
+ Make sure to test the downported code, it might not always be completely correct.`,
158
160
  tags: [_irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],
159
161
  };
160
162
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.101.5",
3
+ "version": "2.101.7",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -51,7 +51,7 @@
51
51
  "@microsoft/api-extractor": "^7.35.0",
52
52
  "@types/chai": "^4.3.5",
53
53
  "@types/mocha": "^10.0.1",
54
- "@types/node": "^20.2.3",
54
+ "@types/node": "^20.2.5",
55
55
  "chai": "^4.3.7",
56
56
  "eslint": "^8.41.0",
57
57
  "mocha": "^10.2.0",