@abaplint/cli 2.106.1 → 2.106.3

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 +40 -30
  2. package/package.json +7 -7
package/build/cli.js CHANGED
@@ -9233,10 +9233,10 @@ class TypeTable extends combi_1.Expression {
9233
9233
  const header = "WITH HEADER LINE";
9234
9234
  const initial = (0, combi_1.seq)("INITIAL SIZE", _1.Constant);
9235
9235
  const generic = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE");
9236
- const normal1 = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE OF", (0, combi_1.opt)("REF TO"), (0, combi_1.opt)(_1.TypeName));
9236
+ const normal1 = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE OF", (0, combi_1.optPrio)("REF TO"), _1.TypeName);
9237
9237
  const likeType = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE OF", (0, combi_1.optPrio)("REF TO"), (0, combi_1.opt)(field_chain_1.FieldChain), (0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))));
9238
- const rangeType = (0, combi_1.seq)("RANGE OF", _1.TypeName, (0, combi_1.opt)(header), (0, combi_1.opt)(initial));
9239
- const rangeLike = (0, combi_1.seq)("RANGE OF", _1.SimpleFieldChain, (0, combi_1.opt)(header), (0, combi_1.opt)(initial));
9238
+ const rangeType = (0, combi_1.seq)("RANGE OF", _1.TypeName, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
9239
+ const rangeLike = (0, combi_1.seq)("RANGE OF", _1.SimpleFieldChain, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
9240
9240
  // a maximum of 15 secondary table keys can be defined
9241
9241
  // "WITH" is not allowed as a field name in keys
9242
9242
  const typetable = (0, combi_1.alt)(generic, (0, combi_1.seq)(normal1, (0, combi_1.alt)((0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))), (0, combi_1.seq)((0, combi_1.plus)(type_table_key_1.TypeTableKey), (0, combi_1.optPrio)(initial)))));
@@ -29167,13 +29167,11 @@ class Concatenate {
29167
29167
  }
29168
29168
  }
29169
29169
  }
29170
- else {
29171
- for (const s of node.findDirectExpressions(Expressions.SimpleSource3)) {
29172
- const type = new source_1.Source().runSyntax(s, scope, filename);
29173
- const compatible = byteMode ? new _type_utils_1.TypeUtils(scope).isHexLike(type) : new _type_utils_1.TypeUtils(scope).isCharLikeStrict(type);
29174
- if (compatible === false) {
29175
- throw new Error("Source type not compatible");
29176
- }
29170
+ for (const s of node.findDirectExpressions(Expressions.SimpleSource3)) {
29171
+ const type = new source_1.Source().runSyntax(s, scope, filename);
29172
+ const compatible = byteMode ? new _type_utils_1.TypeUtils(scope).isHexLike(type) : new _type_utils_1.TypeUtils(scope).isCharLikeStrict(type);
29173
+ if (compatible === false) {
29174
+ throw new Error("Source type not compatible");
29177
29175
  }
29178
29176
  }
29179
29177
  }
@@ -51383,7 +51381,7 @@ class Registry {
51383
51381
  }
51384
51382
  static abaplintVersion() {
51385
51383
  // magic, see build script "version.sh"
51386
- return "2.106.1";
51384
+ return "2.106.3";
51387
51385
  }
51388
51386
  getDDICReferences() {
51389
51387
  return this.ddicReferences;
@@ -65093,17 +65091,17 @@ class NoPrefixesConf extends _basic_rule_config_1.BasicRuleConfig {
65093
65091
  constructor() {
65094
65092
  super(...arguments);
65095
65093
  /** DATA, CLASS-DATA, DATA BEGIN OF, CLASS-DATA BEGIN OF, FINAL(), DATA(), case insensitive regex */
65096
- this.data = "^[lg].?_";
65094
+ this.data = "^[LGM].?_";
65097
65095
  /** STATICS, STATICS BEGIN OF, case insensitive regex */
65098
- this.statics = "";
65096
+ this.statics = "^S.?_";
65099
65097
  /** FIELD-SYMBOLS and inline FIELD-SYMBOLS(), case insensitive regex */
65100
- this.fieldSymbols = "^<l.?_";
65098
+ this.fieldSymbols = "^<[LGM].?_";
65101
65099
  /** CONSTANTS, CONSTANTS BEGIN OF, case insensitive regex */
65102
- this.constants = "^[lg]c_";
65100
+ this.constants = "^[LGM]?C.?_";
65103
65101
  /** TYPES, ENUM, MESH, case insensitive regex */
65104
- this.types = "^ty_";
65102
+ this.types = "^TY_";
65105
65103
  /** importing, exporting, returning and changing parameters, case insensitive regex */
65106
- this.methodParameters = "^[ierc].?_";
65104
+ this.methodParameters = "^[ICER].?_";
65107
65105
  // todo, public localClass: string = "";
65108
65106
  // todo, public localInterface: string = "";
65109
65107
  // todo, public functionModuleParameters: string = "";
@@ -72722,16 +72720,15 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
72722
72720
  exports.WhitespaceEnd = exports.WhitespaceEndConf = void 0;
72723
72721
  const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
72724
72722
  const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
72725
- const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
72726
72723
  const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
72727
72724
  const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
72728
72725
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
72726
+ const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
72729
72727
  class WhitespaceEndConf extends _basic_rule_config_1.BasicRuleConfig {
72730
72728
  }
72731
72729
  exports.WhitespaceEndConf = WhitespaceEndConf;
72732
- class WhitespaceEnd extends _abap_rule_1.ABAPRule {
72730
+ class WhitespaceEnd {
72733
72731
  constructor() {
72734
- super(...arguments);
72735
72732
  this.conf = new WhitespaceEndConf();
72736
72733
  }
72737
72734
  getMetadata() {
@@ -72739,7 +72736,10 @@ class WhitespaceEnd extends _abap_rule_1.ABAPRule {
72739
72736
  key: "whitespace_end",
72740
72737
  title: "Whitespace at end of line",
72741
72738
  shortDescription: `Checks for redundant whitespace at the end of each line.`,
72739
+ extendedInformation: `SMIM and W3MI files are not checked.`,
72742
72740
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
72741
+ badExample: `WRITE 'hello'. `,
72742
+ goodExample: `WRITE 'hello'.`,
72743
72743
  };
72744
72744
  }
72745
72745
  getMessage() {
@@ -72751,17 +72751,25 @@ class WhitespaceEnd extends _abap_rule_1.ABAPRule {
72751
72751
  setConfig(conf) {
72752
72752
  this.conf = conf;
72753
72753
  }
72754
- runParsed(file) {
72754
+ initialize(_reg) {
72755
+ return this;
72756
+ }
72757
+ run(obj) {
72755
72758
  const issues = [];
72756
- const rows = file.getRawRows();
72757
- for (let i = 0; i < rows.length; i++) {
72758
- if (rows[i].endsWith(" ") || rows[i].endsWith(" \r")) {
72759
- const match = / +\r?$/.exec(rows[i]);
72760
- const start = new position_1.Position(i + 1, match.index + 1);
72761
- const end = new position_1.Position(i + 1, rows[i].length + 1);
72762
- const fix = edit_helper_1.EditHelper.deleteRange(file, start, end);
72763
- const issue = issue_1.Issue.atRange(file, start, end, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);
72764
- issues.push(issue);
72759
+ for (const file of obj.getFiles()) {
72760
+ if (obj instanceof objects_1.MIMEObject || obj instanceof objects_1.WebMIME) {
72761
+ continue;
72762
+ }
72763
+ const rows = file.getRawRows();
72764
+ for (let i = 0; i < rows.length; i++) {
72765
+ if (rows[i].endsWith(" ") || rows[i].endsWith(" \r")) {
72766
+ const match = / +\r?$/.exec(rows[i]);
72767
+ const start = new position_1.Position(i + 1, match.index + 1);
72768
+ const end = new position_1.Position(i + 1, rows[i].length + 1);
72769
+ const fix = edit_helper_1.EditHelper.deleteRange(file, start, end);
72770
+ const issue = issue_1.Issue.atRange(file, start, end, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);
72771
+ issues.push(issue);
72772
+ }
72765
72773
  }
72766
72774
  }
72767
72775
  return issues;
@@ -75277,6 +75285,8 @@ class OrderedObjParser{
75277
75285
  "copyright" : { regex: /&(copy|#169);/g, val: "©" },
75278
75286
  "reg" : { regex: /&(reg|#174);/g, val: "®" },
75279
75287
  "inr" : { regex: /&(inr|#8377);/g, val: "₹" },
75288
+ "num_dec": { regex: /&#([0-9]{1,7});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 10)) },
75289
+ "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 16)) },
75280
75290
  };
75281
75291
  this.addExternalEntities = addExternalEntities;
75282
75292
  this.parseXml = parseXml;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.106.1",
3
+ "version": "2.106.3",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,24 +38,24 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.106.1",
42
- "@types/chai": "^4.3.12",
41
+ "@abaplint/core": "^2.106.3",
42
+ "@types/chai": "^4.3.14",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.6",
46
- "@types/node": "^20.11.25",
46
+ "@types/node": "^20.11.30",
47
47
  "@types/progress": "^2.0.7",
48
48
  "chai": "^4.4.1",
49
49
  "chalk": "^5.3.0",
50
50
  "eslint": "^8.57.0",
51
51
  "glob": "^7.2.3",
52
52
  "json5": "^2.2.3",
53
- "memfs": "^4.7.7",
53
+ "memfs": "^4.8.0",
54
54
  "minimist": "^1.2.8",
55
55
  "mocha": "^10.3.0",
56
56
  "progress": "^2.0.3",
57
- "typescript": "^5.4.2",
58
- "webpack": "^5.90.3",
57
+ "typescript": "^5.4.3",
58
+ "webpack": "^5.91.0",
59
59
  "webpack-cli": "^5.1.4",
60
60
  "xml-js": "^1.6.11"
61
61
  },