@abaplint/cli 2.113.141 → 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 +14 -6
  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
  }
@@ -25742,8 +25742,9 @@ const dereference_1 = __webpack_require__(/*! ./dereference */ "./node_modules/@
25742
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");
25743
25743
  const source_field_1 = __webpack_require__(/*! ./source_field */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source_field.js");
25744
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");
25745
25746
  class FieldChain {
25746
- static runSyntax(node, input, refType) {
25747
+ static runSyntax(node, input, refType, allowGenericDeference = false) {
25747
25748
  var _a, _b, _c;
25748
25749
  if (((_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.SourceField
25749
25750
  && node.findDirectExpression(Expressions.ComponentName)) {
@@ -25818,6 +25819,12 @@ class FieldChain {
25818
25819
  }
25819
25820
  else if (current.get() instanceof expressions_1.Dereference) {
25820
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
+ }
25821
25828
  }
25822
25829
  else if (current.get() instanceof Expressions.ComponentName) {
25823
25830
  if (context instanceof basic_1.TableType && context.isWithHeader()) {
@@ -27982,8 +27989,9 @@ const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_module
27982
27989
  * VALUE #( ... ). syntax error
27983
27990
  * DATA(bar) = VALUE #( ... ). give error, no type can be derived
27984
27991
  */
27992
+ // TODO: refactor all these method parameters to objects, this is getting messy
27985
27993
  class Source {
27986
- static runSyntax(node, input, targetType, writeReference = false) {
27994
+ static runSyntax(node, input, targetType, writeReference = false, allowGenericDeference = false) {
27987
27995
  if (node === undefined) {
27988
27996
  return undefined;
27989
27997
  }
@@ -28146,7 +28154,7 @@ class Source {
28146
28154
  }
28147
28155
  }
28148
28156
  else if (get instanceof Expressions.FieldChain) {
28149
- context = field_chain_1.FieldChain.runSyntax(first, input, type);
28157
+ context = field_chain_1.FieldChain.runSyntax(first, input, type, allowGenericDeference);
28150
28158
  }
28151
28159
  else if (get instanceof Expressions.StringTemplate) {
28152
28160
  context = string_template_1.StringTemplate.runSyntax(first, input);
@@ -29818,7 +29826,7 @@ class Assign {
29818
29826
  sourceType = basic_1.VoidType.get("Dynamic");
29819
29827
  }
29820
29828
  else {
29821
- sourceType = source_1.Source.runSyntax(theSource, input);
29829
+ sourceType = source_1.Source.runSyntax(theSource, input, undefined, false, true);
29822
29830
  }
29823
29831
  if ((assignSource === null || assignSource === void 0 ? void 0 : assignSource.getChildren().length) === 5
29824
29832
  && ((_a = assignSource === null || assignSource === void 0 ? void 0 : assignSource.getFirstChild()) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase()) === "COMPONENT") {
@@ -54574,7 +54582,7 @@ class Registry {
54574
54582
  }
54575
54583
  static abaplintVersion() {
54576
54584
  // magic, see build script "version.sh"
54577
- return "2.113.141";
54585
+ return "2.113.142";
54578
54586
  }
54579
54587
  getDDICReferences() {
54580
54588
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.141",
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.141",
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",