@abaplint/core 2.101.29 → 2.101.31

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.
@@ -297,7 +297,10 @@ class TypeUtils {
297
297
  }
298
298
  }
299
299
  else if (source instanceof basic_1.XStringType) {
300
- if (target instanceof basic_1.CLikeType) {
300
+ if (target instanceof basic_1.CLikeType
301
+ || target instanceof basic_1.IntegerType
302
+ || target instanceof basic_1.ObjectReferenceType
303
+ || target instanceof basic_1.HexType) {
301
304
  return false;
302
305
  }
303
306
  }
@@ -8,22 +8,22 @@ const dynamic_1 = require("../expressions/dynamic");
8
8
  const basic_1 = require("../../types/basic");
9
9
  class Assign {
10
10
  runSyntax(node, scope, filename) {
11
- var _a, _b;
12
- const sources = node.findAllExpressions(Expressions.Source);
13
- const firstSource = sources[0];
14
- let sourceType = new source_1.Source().runSyntax(firstSource, scope, filename);
15
- if (sourceType === undefined || ((_a = node.findDirectExpression(Expressions.AssignSource)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Dynamic))) {
11
+ var _a, _b, _c;
12
+ const sources = ((_a = node.findDirectExpression(Expressions.AssignSource)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.Source)) || [];
13
+ const theSource = sources[sources.length - 1];
14
+ let sourceType = new source_1.Source().runSyntax(theSource, scope, filename);
15
+ if (sourceType === undefined || ((_b = node.findDirectExpression(Expressions.AssignSource)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.Dynamic))) {
16
16
  sourceType = new basic_1.VoidType("DynamicAssign");
17
17
  }
18
- for (const d of ((_b = node.findDirectExpression(Expressions.AssignSource)) === null || _b === void 0 ? void 0 : _b.findAllExpressions(Expressions.Dynamic)) || []) {
18
+ for (const d of ((_c = node.findDirectExpression(Expressions.AssignSource)) === null || _c === void 0 ? void 0 : _c.findAllExpressions(Expressions.Dynamic)) || []) {
19
19
  new dynamic_1.Dynamic().runSyntax(d, scope, filename);
20
20
  }
21
21
  const target = node.findDirectExpression(Expressions.FSTarget);
22
22
  if (target) {
23
23
  new fstarget_1.FSTarget().runSyntax(target, scope, filename, sourceType);
24
24
  }
25
- for (const s of sources) {
26
- if (s === firstSource) {
25
+ for (const s of node.findAllExpressions(Expressions.Source)) {
26
+ if (s === theSource) {
27
27
  continue;
28
28
  }
29
29
  new source_1.Source().runSyntax(s, scope, filename);
@@ -65,7 +65,7 @@ class Registry {
65
65
  }
66
66
  static abaplintVersion() {
67
67
  // magic, see build script "version.sh"
68
- return "2.101.29";
68
+ return "2.101.31";
69
69
  }
70
70
  getDDICReferences() {
71
71
  return this.ddicReferences;
@@ -10,9 +10,11 @@ class FunctionModuleRecommendationsConf extends _basic_rule_config_1.BasicRuleCo
10
10
  constructor() {
11
11
  super(...arguments);
12
12
  /** Tuple of Function Module Name to be replaced, the recommended alternative and
13
- * the version from which the recommendation is valid.*/
13
+ * the version from which the recommendation is valid.
14
+ * @uniqueItems true
15
+ */
14
16
  this.recommendations = [
15
- { name: "CALCULATE_HASH_FOR_RAW", replace: "use CL_ABAP_HMAC" },
17
+ { name: "CALCULATE_HASH_FOR_RAW", replace: "use CL_ABAP_HMAC or CL_ABAP_MESSAGE_DIGEST" },
16
18
  { name: "ECATT_CONV_XSTRING_TO_STRING", replace: "use CL_BINARY_CONVERT" },
17
19
  { name: "F4_FILENAME", replace: "use CL_GUI_FRONTEND_SERVICES" },
18
20
  { name: "FUNCTION_EXISTS", replace: "surround with try-catch CX_SY_DYN_CALL_ILLEGAL_METHOD instead" },
@@ -21,10 +23,11 @@ class FunctionModuleRecommendationsConf extends _basic_rule_config_1.BasicRuleCo
21
23
  { name: "GUID_CREATE", replace: "use CL_SYSTEM_UUID" },
22
24
  { name: "IGN_TIMESTAMP_DIFFERENCE", replace: "use CL_ABAP_TSTMP" },
23
25
  { name: "IGN_TIMESTAMP_PLUSMINUS", replace: "use CL_ABAP_TSTMP" },
26
+ { name: "ISM_SD_GET_PRICING_CONDITIONS", replace: "use CL_PRC_RESULT_FACTORY as per note 2220005" },
24
27
  { name: "JOB_CREATE", replace: "use CL_BP_ABAP_JOB" },
25
28
  { name: "JOB_SUBMIT", replace: "use CL_BP_ABAP_JOB" },
26
- { name: "POPUP_TO_DECIDE", replace: "use POPUP_TO_CONFIRM" },
27
29
  { name: "POPUP_TO_CONFIRM_STEP", replace: "use POPUP_TO_CONFIRM" },
30
+ { name: "POPUP_TO_DECIDE", replace: "use POPUP_TO_CONFIRM" },
28
31
  { name: "POPUP_TO_GET_VALUE", replace: "use POPUP_GET_VALUES" },
29
32
  { name: "REUSE_ALV_GRID_DISPLAY", replace: "use CL_SALV_TABLE=>FACTORY or CL_GUI_ALV_GRID" },
30
33
  { name: "ROUND", replace: "use built in function: round()" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.101.29",
3
+ "version": "2.101.31",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -53,9 +53,9 @@
53
53
  "@microsoft/api-extractor": "^7.36.0",
54
54
  "@types/chai": "^4.3.5",
55
55
  "@types/mocha": "^10.0.1",
56
- "@types/node": "^20.3.2",
56
+ "@types/node": "^20.3.3",
57
57
  "chai": "^4.3.7",
58
- "eslint": "^8.43.0",
58
+ "eslint": "^8.44.0",
59
59
  "mocha": "^10.2.0",
60
60
  "c8": "^8.0.0",
61
61
  "source-map-support": "^0.5.21",