@abaplint/transpiler-cli 2.7.29 → 2.7.30

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 +26 -15
  2. package/package.json +4 -4
package/build/bundle.js CHANGED
@@ -20773,7 +20773,10 @@ class TypeUtils {
20773
20773
  }
20774
20774
  }
20775
20775
  else if (source instanceof basic_1.XStringType) {
20776
- if (target instanceof basic_1.CLikeType) {
20776
+ if (target instanceof basic_1.CLikeType
20777
+ || target instanceof basic_1.IntegerType
20778
+ || target instanceof basic_1.ObjectReferenceType
20779
+ || target instanceof basic_1.HexType) {
20777
20780
  return false;
20778
20781
  }
20779
20782
  }
@@ -26146,22 +26149,22 @@ const dynamic_1 = __webpack_require__(/*! ../expressions/dynamic */ "./node_modu
26146
26149
  const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
26147
26150
  class Assign {
26148
26151
  runSyntax(node, scope, filename) {
26149
- var _a, _b;
26150
- const sources = node.findAllExpressions(Expressions.Source);
26151
- const firstSource = sources[0];
26152
- let sourceType = new source_1.Source().runSyntax(firstSource, scope, filename);
26153
- if (sourceType === undefined || ((_a = node.findDirectExpression(Expressions.AssignSource)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Dynamic))) {
26152
+ var _a, _b, _c;
26153
+ const sources = ((_a = node.findDirectExpression(Expressions.AssignSource)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.Source)) || [];
26154
+ const theSource = sources[sources.length - 1];
26155
+ let sourceType = new source_1.Source().runSyntax(theSource, scope, filename);
26156
+ if (sourceType === undefined || ((_b = node.findDirectExpression(Expressions.AssignSource)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.Dynamic))) {
26154
26157
  sourceType = new basic_1.VoidType("DynamicAssign");
26155
26158
  }
26156
- for (const d of ((_b = node.findDirectExpression(Expressions.AssignSource)) === null || _b === void 0 ? void 0 : _b.findAllExpressions(Expressions.Dynamic)) || []) {
26159
+ for (const d of ((_c = node.findDirectExpression(Expressions.AssignSource)) === null || _c === void 0 ? void 0 : _c.findAllExpressions(Expressions.Dynamic)) || []) {
26157
26160
  new dynamic_1.Dynamic().runSyntax(d, scope, filename);
26158
26161
  }
26159
26162
  const target = node.findDirectExpression(Expressions.FSTarget);
26160
26163
  if (target) {
26161
26164
  new fstarget_1.FSTarget().runSyntax(target, scope, filename, sourceType);
26162
26165
  }
26163
- for (const s of sources) {
26164
- if (s === firstSource) {
26166
+ for (const s of node.findAllExpressions(Expressions.Source)) {
26167
+ if (s === theSource) {
26165
26168
  continue;
26166
26169
  }
26167
26170
  new source_1.Source().runSyntax(s, scope, filename);
@@ -47515,7 +47518,7 @@ class Registry {
47515
47518
  }
47516
47519
  static abaplintVersion() {
47517
47520
  // magic, see build script "version.sh"
47518
- return "2.101.29";
47521
+ return "2.101.32";
47519
47522
  }
47520
47523
  getDDICReferences() {
47521
47524
  return this.ddicReferences;
@@ -56155,9 +56158,11 @@ class FunctionModuleRecommendationsConf extends _basic_rule_config_1.BasicRuleCo
56155
56158
  constructor() {
56156
56159
  super(...arguments);
56157
56160
  /** Tuple of Function Module Name to be replaced, the recommended alternative and
56158
- * the version from which the recommendation is valid.*/
56161
+ * the version from which the recommendation is valid.
56162
+ * @uniqueItems true
56163
+ */
56159
56164
  this.recommendations = [
56160
- { name: "CALCULATE_HASH_FOR_RAW", replace: "use CL_ABAP_HMAC" },
56165
+ { name: "CALCULATE_HASH_FOR_RAW", replace: "use CL_ABAP_HMAC or CL_ABAP_MESSAGE_DIGEST" },
56161
56166
  { name: "ECATT_CONV_XSTRING_TO_STRING", replace: "use CL_BINARY_CONVERT" },
56162
56167
  { name: "F4_FILENAME", replace: "use CL_GUI_FRONTEND_SERVICES" },
56163
56168
  { name: "FUNCTION_EXISTS", replace: "surround with try-catch CX_SY_DYN_CALL_ILLEGAL_METHOD instead" },
@@ -56166,10 +56171,11 @@ class FunctionModuleRecommendationsConf extends _basic_rule_config_1.BasicRuleCo
56166
56171
  { name: "GUID_CREATE", replace: "use CL_SYSTEM_UUID" },
56167
56172
  { name: "IGN_TIMESTAMP_DIFFERENCE", replace: "use CL_ABAP_TSTMP" },
56168
56173
  { name: "IGN_TIMESTAMP_PLUSMINUS", replace: "use CL_ABAP_TSTMP" },
56174
+ { name: "ISM_SD_GET_PRICING_CONDITIONS", replace: "use CL_PRC_RESULT_FACTORY as per note 2220005" },
56169
56175
  { name: "JOB_CREATE", replace: "use CL_BP_ABAP_JOB" },
56170
56176
  { name: "JOB_SUBMIT", replace: "use CL_BP_ABAP_JOB" },
56171
- { name: "POPUP_TO_DECIDE", replace: "use POPUP_TO_CONFIRM" },
56172
56177
  { name: "POPUP_TO_CONFIRM_STEP", replace: "use POPUP_TO_CONFIRM" },
56178
+ { name: "POPUP_TO_DECIDE", replace: "use POPUP_TO_CONFIRM" },
56173
56179
  { name: "POPUP_TO_GET_VALUE", replace: "use POPUP_GET_VALUES" },
56174
56180
  { name: "REUSE_ALV_GRID_DISPLAY", replace: "use CL_SALV_TABLE=>FACTORY or CL_GUI_ALV_GRID" },
56175
56181
  { name: "ROUND", replace: "use built in function: round()" },
@@ -63923,7 +63929,9 @@ class SelectSingleFullKey {
63923
63929
  key: "select_single_full_key",
63924
63930
  title: "Detect SELECT SINGLE which are possibily not unique",
63925
63931
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
63926
- extendedInformation: `Table definitions must be known, ie. inside the errorNamespace`,
63932
+ extendedInformation: `Table definitions must be known, ie. inside the errorNamespace
63933
+
63934
+ If the statement contains a JOIN it is not checked`,
63927
63935
  pseudoComment: "EC CI_NOORDER",
63928
63936
  tags: [],
63929
63937
  };
@@ -63964,6 +63972,9 @@ class SelectSingleFullKey {
63964
63972
  if (!(s.get() instanceof __1.Statements.Select)) {
63965
63973
  continue;
63966
63974
  }
63975
+ else if (s.findFirstExpression(__1.Expressions.SQLJoin)) {
63976
+ continue;
63977
+ }
63967
63978
  else if (s.findTokenSequencePosition("SELECT", "SINGLE") === undefined) {
63968
63979
  continue;
63969
63980
  }
@@ -80235,7 +80246,7 @@ class Traversal {
80235
80246
  if (s === undefined) {
80236
80247
  continue;
80237
80248
  }
80238
- handle(s, name + ".get()." + v);
80249
+ handle(s, name + ".get()." + v.toLowerCase());
80239
80250
  }
80240
80251
  }
80241
80252
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.7.29",
3
+ "version": "2.7.30",
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.29",
29
+ "@abaplint/transpiler": "^2.7.30",
30
30
  "@types/glob": "^7.2.0",
31
31
  "glob": "=7.2.0",
32
32
  "@types/progress": "^2.0.5",
33
- "@types/node": "^20.3.3",
34
- "@abaplint/core": "^2.101.29",
33
+ "@types/node": "^20.4.0",
34
+ "@abaplint/core": "^2.101.32",
35
35
  "progress": "^2.0.3",
36
36
  "webpack": "^5.88.1",
37
37
  "webpack-cli": "^5.1.4",