@abaplint/cli 2.113.139 → 2.113.141

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 +22 -26
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -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
  }
@@ -33227,7 +33226,7 @@ const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_module
33227
33226
  class Ranges {
33228
33227
  runSyntax(node, input) {
33229
33228
  var _a;
33230
- const nameToken = (_a = node.findFirstExpression(Expressions.SimpleName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
33229
+ const nameToken = (_a = node.findFirstExpression(Expressions.DefinitionName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
33231
33230
  const typeExpression = node.findFirstExpression(Expressions.SimpleFieldChain2);
33232
33231
  if (typeExpression === undefined) {
33233
33232
  throw new assert_error_1.AssertError("Ranges, unexpected node");
@@ -54575,7 +54574,7 @@ class Registry {
54575
54574
  }
54576
54575
  static abaplintVersion() {
54577
54576
  // magic, see build script "version.sh"
54578
- return "2.113.139";
54577
+ return "2.113.141";
54579
54578
  }
54580
54579
  getDDICReferences() {
54581
54580
  return this.ddicReferences;
@@ -77413,8 +77412,9 @@ class RulesRunner {
77413
77412
  }
77414
77413
  (_c = input === null || input === void 0 ? void 0 : input.progress) === null || _c === void 0 ? void 0 : _c.set(rules.length, "Initialize Rules");
77415
77414
  for (const rule of rules) {
77415
+ const start = Date.now();
77416
77416
  if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {
77417
- process.stderr.write("Initializing rule " + rule.getMetadata().key + "\n");
77417
+ process.stderr.write("Initializing rule " + rule.getMetadata().key);
77418
77418
  }
77419
77419
  else {
77420
77420
  (_d = input === null || input === void 0 ? void 0 : input.progress) === null || _d === void 0 ? void 0 : _d.tick("Initialize Rules - " + rule.getMetadata().key);
@@ -77423,6 +77423,9 @@ class RulesRunner {
77423
77423
  throw new Error(rule.getMetadata().key + " missing initialize method");
77424
77424
  }
77425
77425
  rule.initialize(this.reg);
77426
+ if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {
77427
+ process.stderr.write(", " + (Date.now() - start) + "ms\n");
77428
+ }
77426
77429
  rulePerformance[rule.getMetadata().key] = 0;
77427
77430
  }
77428
77431
  (_e = input === null || input === void 0 ? void 0 : input.progress) === null || _e === void 0 ? void 0 : _e.set(check.length, "Finding Issues");
@@ -77893,9 +77896,6 @@ class IncludeGraph {
77893
77896
  this.graph = new Graph();
77894
77897
  this.build();
77895
77898
  }
77896
- getIssues() {
77897
- return this.issues;
77898
- }
77899
77899
  listMainForInclude(filename) {
77900
77900
  const ret = [];
77901
77901
  if (filename === undefined) {
@@ -77915,6 +77915,17 @@ class IncludeGraph {
77915
77915
  ret.push(i);
77916
77916
  }
77917
77917
  }
77918
+ const v = this.graph.findVertexByFilename(file.getFilename());
77919
+ if (v !== undefined
77920
+ && v.include === true
77921
+ && this.listMainForInclude(v.filename).length === 0) {
77922
+ const f = this.reg.getFileByName(v.filename);
77923
+ if (f === undefined) {
77924
+ throw new Error("findUnusedIncludes internal error");
77925
+ }
77926
+ const issue = issue_1.Issue.atPosition(f, new position_1.Position(1, 1), "INCLUDE not used anywhere", new check_include_1.CheckInclude().getMetadata().key, severity_1.Severity.Error);
77927
+ ret.push(issue);
77928
+ }
77918
77929
  return ret;
77919
77930
  }
77920
77931
  ///////////////////////////////
@@ -77955,21 +77966,6 @@ class IncludeGraph {
77955
77966
  }
77956
77967
  }
77957
77968
  }
77958
- this.findUnusedIncludes();
77959
- }
77960
- findUnusedIncludes() {
77961
- for (const v of Object.values(this.graph.verticesFilenameIndex)) {
77962
- if (v.include === true) {
77963
- if (this.listMainForInclude(v.filename).length === 0) {
77964
- const f = this.reg.getFileByName(v.filename);
77965
- if (f === undefined) {
77966
- throw new Error("findUnusedIncludes internal error");
77967
- }
77968
- const issue = issue_1.Issue.atPosition(f, new position_1.Position(1, 1), "INCLUDE not used anywhere", new check_include_1.CheckInclude().getMetadata().key, severity_1.Severity.Error);
77969
- this.issues.push(issue);
77970
- }
77971
- }
77972
- }
77973
77969
  }
77974
77970
  addVertices() {
77975
77971
  for (const o of getABAPObjects(this.reg)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.139",
3
+ "version": "2.113.141",
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.139",
41
+ "@abaplint/core": "^2.113.141",
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.10",
45
+ "@types/node": "^24.0.12",
46
46
  "@types/progress": "^2.0.7",
47
47
  "chai": "^4.5.0",
48
48
  "p-limit": "^3.1.0",