@abaplint/transpiler-cli 2.7.144 → 2.7.146

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 +22 -3
  2. package/package.json +4 -4
package/build/bundle.js CHANGED
@@ -25748,6 +25748,9 @@ class Source {
25748
25748
  while (children.length >= 0) {
25749
25749
  if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.MethodCallChain) {
25750
25750
  context = new method_call_chain_1.MethodCallChain().runSyntax(first, scope, filename, targetType);
25751
+ if (context === undefined) {
25752
+ throw new Error("Method has no RETURNING value");
25753
+ }
25751
25754
  }
25752
25755
  else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.FieldChain) {
25753
25756
  context = new field_chain_1.FieldChain().runSyntax(first, scope, filename, type);
@@ -25952,6 +25955,19 @@ class SQLCompare {
25952
25955
  }
25953
25956
  sourceType = new sql_source_1.SQLSource().runSyntax(s, scope, filename);
25954
25957
  }
25958
+ const sqlin = node.findDirectExpression(Expressions.SQLIn);
25959
+ if (sqlin && sqlin.getChildren().length === 2) {
25960
+ const insource = node.findFirstExpression(Expressions.SQLSource);
25961
+ if (insource) {
25962
+ const intype = new sql_source_1.SQLSource().runSyntax(insource, scope, filename);
25963
+ if (intype &&
25964
+ !(intype instanceof basic_1.VoidType) &&
25965
+ !(intype instanceof basic_1.UnknownType) &&
25966
+ !(intype instanceof basic_1.TableType)) {
25967
+ throw new Error("IN, not a table");
25968
+ }
25969
+ }
25970
+ }
25955
25971
  const fieldName = (_a = node.findDirectExpression(Expressions.SQLFieldName)) === null || _a === void 0 ? void 0 : _a.concatTokens();
25956
25972
  if (fieldName && sourceType && token) {
25957
25973
  // check compatibility for rule sql_value_conversion
@@ -50075,7 +50091,7 @@ class Registry {
50075
50091
  }
50076
50092
  static abaplintVersion() {
50077
50093
  // magic, see build script "version.sh"
50078
- return "2.105.11";
50094
+ return "2.105.12";
50079
50095
  }
50080
50096
  getDDICReferences() {
50081
50097
  return this.ddicReferences;
@@ -82240,10 +82256,13 @@ exports.UnassignTranspiler = UnassignTranspiler;
82240
82256
 
82241
82257
  Object.defineProperty(exports, "__esModule", ({ value: true }));
82242
82258
  exports.UnpackTranspiler = void 0;
82259
+ const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
82243
82260
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
82244
82261
  class UnpackTranspiler {
82245
- transpile(_node, _traversal) {
82246
- return new chunk_1.Chunk(`throw new Error("Unpack, transpiler todo");`);
82262
+ transpile(node, traversal) {
82263
+ const s = traversal.traverse(node.findFirstExpression(abaplint.Expressions.Source));
82264
+ const t = traversal.traverse(node.findFirstExpression(abaplint.Expressions.Target));
82265
+ return new chunk_1.Chunk(`await abap.statements.unpack(${s.getCode()},${t.getCode()});`);
82247
82266
  }
82248
82267
  }
82249
82268
  exports.UnpackTranspiler = UnpackTranspiler;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.7.144",
3
+ "version": "2.7.146",
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.144",
30
- "@types/glob": "^7.2.0",
29
+ "@abaplint/transpiler": "^2.7.146",
30
+ "@types/glob": "^8.1.0",
31
31
  "glob": "=7.2.0",
32
32
  "@types/progress": "^2.0.7",
33
33
  "@types/node": "^20.11.5",
34
- "@abaplint/core": "^2.105.11",
34
+ "@abaplint/core": "^2.105.12",
35
35
  "progress": "^2.0.3",
36
36
  "webpack": "^5.89.0",
37
37
  "webpack-cli": "^5.1.4",