@abaplint/cli 2.113.140 → 2.113.142

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/cli.js +19 -12
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -102,7 +102,7 @@ class FileOperations {
102
102
  static loadFileNames(arg, error = true) {
103
103
  const files = glob.sync(arg, { nodir: true, absolute: true, posix: true });
104
104
  if (files.length === 0 && error) {
105
- throw "Error: No files found";
105
+ throw "Error: No files found" + arg;
106
106
  }
107
107
  return files;
108
108
  }
@@ -7580,7 +7580,7 @@ class SelectLoop extends combi_1.Expression {
7580
7580
  const tab = (0, combi_1.seq)(_1.SQLIntoTable, (0, combi_1.alt)(pack, (0, combi_1.seq)(_1.SQLFrom, pack), (0, combi_1.seq)(pack, _1.SQLFrom)));
7581
7581
  const packTab = (0, combi_1.seq)(pack, _1.SQLIntoTable);
7582
7582
  const into = (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList);
7583
- const perm = (0, combi_1.per)(_1.SQLFrom, where, sql_up_to_1.SQLUpTo, sql_order_by_1.SQLOrderBy, sql_having_1.SQLHaving, _1.SQLClient, bypass, _1.SQLGroupBy, _1.SQLForAllEntries, (0, combi_1.alt)(tab, into, packTab));
7583
+ const perm = (0, combi_1.per)(_1.SQLFrom, where, sql_up_to_1.SQLUpTo, sql_order_by_1.SQLOrderBy, sql_having_1.SQLHaving, _1.SQLClient, bypass, _1.SQLGroupBy, _1.SQLForAllEntries, (0, combi_1.alt)(tab, sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList, packTab));
7584
7584
  const strict = (0, combi_1.seq)(_1.SQLFrom, (0, combi_1.ver)(version_1.Version.v750, sql_fields_loop_1.SQLFieldsLoop), (0, combi_1.optPrio)(_1.SQLForAllEntries), (0, combi_1.optPrio)((0, combi_1.seq)(where, (0, combi_1.optPrio)(sql_order_by_1.SQLOrderBy), into, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo))));
7585
7585
  const aggr = (0, combi_1.seq)(_1.SQLAggregation, into, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), _1.SQLFrom, where, _1.SQLGroupBy);
7586
7586
  const ret = (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), sql_field_list_loop_1.SQLFieldListLoop, perm), strict, aggr), (0, combi_1.optPrio)(sql_hints_1.SQLHints));
@@ -8226,11 +8226,10 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
8226
8226
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
8227
8227
  const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
8228
8228
  const sql_function_1 = __webpack_require__(/*! ./sql_function */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function.js");
8229
- const simple_field_chain_1 = __webpack_require__(/*! ./simple_field_chain */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_field_chain.js");
8230
8229
  const sql_path_1 = __webpack_require__(/*! ./sql_path */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_path.js");
8231
8230
  class SQLField extends combi_1.Expression {
8232
8231
  getRunnable() {
8233
- const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), simple_field_chain_1.SimpleFieldChain));
8232
+ const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2));
8234
8233
  const as = (0, combi_1.seq)("AS", _1.SQLAsName);
8235
8234
  const field = (0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLCase, sql_function_1.SQLFunction, sql_path_1.SQLPath, _1.SQLFieldName, abap, _1.Constant);
8236
8235
  const sub = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenLeftW)), field, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW))));
@@ -8318,7 +8317,7 @@ class SQLFieldListLoop extends combi_1.Expression {
8318
8317
  const comma = (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v740sp05, ","));
8319
8318
  const as = (0, combi_1.seq)("AS", _1.SQLAsName);
8320
8319
  const someField = (0, combi_1.seq)(_1.SQLField, comma);
8321
- const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain));
8320
+ const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2));
8322
8321
  const fieldList = (0, combi_1.seq)((0, combi_1.star)(someField), (0, combi_1.alt)(_1.SQLFieldName, abap, sql_path_1.SQLPath, _1.Constant), (0, combi_1.optPrio)(as), comma, (0, combi_1.star)(someField));
8323
8322
  const fields = (0, combi_1.alt)("*", _1.Dynamic, fieldList);
8324
8323
  return fields;
@@ -15966,7 +15965,7 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
15966
15965
  class Ranges {
15967
15966
  getMatcher() {
15968
15967
  const occurs = (0, combi_1.seq)("OCCURS", expressions_1.Source);
15969
- const ret = (0, combi_1.seq)("RANGES", expressions_1.SimpleName, "FOR", expressions_1.SimpleFieldChain2, (0, combi_1.optPrio)(occurs), (0, combi_1.optPrio)(expressions_1.FieldLength));
15968
+ const ret = (0, combi_1.seq)("RANGES", expressions_1.DefinitionName, "FOR", expressions_1.SimpleFieldChain2, (0, combi_1.optPrio)(occurs), (0, combi_1.optPrio)(expressions_1.FieldLength));
15970
15969
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
15971
15970
  }
15972
15971
  }
@@ -25743,8 +25742,9 @@ const dereference_1 = __webpack_require__(/*! ./dereference */ "./node_modules/@
25743
25742
  const source_field_symbol_1 = __webpack_require__(/*! ./source_field_symbol */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source_field_symbol.js");
25744
25743
  const source_field_1 = __webpack_require__(/*! ./source_field */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source_field.js");
25745
25744
  const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
25745
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
25746
25746
  class FieldChain {
25747
- static runSyntax(node, input, refType) {
25747
+ static runSyntax(node, input, refType, allowGenericDeference = false) {
25748
25748
  var _a, _b, _c;
25749
25749
  if (((_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.SourceField
25750
25750
  && node.findDirectExpression(Expressions.ComponentName)) {
@@ -25819,6 +25819,12 @@ class FieldChain {
25819
25819
  }
25820
25820
  else if (current.get() instanceof expressions_1.Dereference) {
25821
25821
  context = dereference_1.Dereference.runSyntax(current, context, input);
25822
+ if (allowGenericDeference === false
25823
+ && (context === null || context === void 0 ? void 0 : context.isGeneric()) === true
25824
+ && input.scope.getVersion() < version_1.Version.v756
25825
+ && input.scope.getVersion() !== version_1.Version.Cloud) {
25826
+ throw new Error("A generic reference cannot be dereferenced");
25827
+ }
25822
25828
  }
25823
25829
  else if (current.get() instanceof Expressions.ComponentName) {
25824
25830
  if (context instanceof basic_1.TableType && context.isWithHeader()) {
@@ -27983,8 +27989,9 @@ const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_module
27983
27989
  * VALUE #( ... ). syntax error
27984
27990
  * DATA(bar) = VALUE #( ... ). give error, no type can be derived
27985
27991
  */
27992
+ // TODO: refactor all these method parameters to objects, this is getting messy
27986
27993
  class Source {
27987
- static runSyntax(node, input, targetType, writeReference = false) {
27994
+ static runSyntax(node, input, targetType, writeReference = false, allowGenericDeference = false) {
27988
27995
  if (node === undefined) {
27989
27996
  return undefined;
27990
27997
  }
@@ -28147,7 +28154,7 @@ class Source {
28147
28154
  }
28148
28155
  }
28149
28156
  else if (get instanceof Expressions.FieldChain) {
28150
- context = field_chain_1.FieldChain.runSyntax(first, input, type);
28157
+ context = field_chain_1.FieldChain.runSyntax(first, input, type, allowGenericDeference);
28151
28158
  }
28152
28159
  else if (get instanceof Expressions.StringTemplate) {
28153
28160
  context = string_template_1.StringTemplate.runSyntax(first, input);
@@ -29819,7 +29826,7 @@ class Assign {
29819
29826
  sourceType = basic_1.VoidType.get("Dynamic");
29820
29827
  }
29821
29828
  else {
29822
- sourceType = source_1.Source.runSyntax(theSource, input);
29829
+ sourceType = source_1.Source.runSyntax(theSource, input, undefined, false, true);
29823
29830
  }
29824
29831
  if ((assignSource === null || assignSource === void 0 ? void 0 : assignSource.getChildren().length) === 5
29825
29832
  && ((_a = assignSource === null || assignSource === void 0 ? void 0 : assignSource.getFirstChild()) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase()) === "COMPONENT") {
@@ -33227,7 +33234,7 @@ const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_module
33227
33234
  class Ranges {
33228
33235
  runSyntax(node, input) {
33229
33236
  var _a;
33230
- const nameToken = (_a = node.findFirstExpression(Expressions.SimpleName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
33237
+ const nameToken = (_a = node.findFirstExpression(Expressions.DefinitionName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
33231
33238
  const typeExpression = node.findFirstExpression(Expressions.SimpleFieldChain2);
33232
33239
  if (typeExpression === undefined) {
33233
33240
  throw new assert_error_1.AssertError("Ranges, unexpected node");
@@ -54575,7 +54582,7 @@ class Registry {
54575
54582
  }
54576
54583
  static abaplintVersion() {
54577
54584
  // magic, see build script "version.sh"
54578
- return "2.113.140";
54585
+ return "2.113.142";
54579
54586
  }
54580
54587
  getDDICReferences() {
54581
54588
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.140",
3
+ "version": "2.113.142",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,11 +38,11 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.113.140",
41
+ "@abaplint/core": "^2.113.142",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",
45
- "@types/node": "^24.0.12",
45
+ "@types/node": "^24.0.13",
46
46
  "@types/progress": "^2.0.7",
47
47
  "chai": "^4.5.0",
48
48
  "p-limit": "^3.1.0",