@abaplint/transpiler-cli 2.8.18 → 2.8.20

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 +36 -24
  2. package/package.json +6 -6
package/build/bundle.js CHANGED
@@ -8174,10 +8174,10 @@ class TypeTable extends combi_1.Expression {
8174
8174
  const header = "WITH HEADER LINE";
8175
8175
  const initial = (0, combi_1.seq)("INITIAL SIZE", _1.Constant);
8176
8176
  const generic = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE");
8177
- 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));
8177
+ 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);
8178
8178
  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))));
8179
- const rangeType = (0, combi_1.seq)("RANGE OF", _1.TypeName, (0, combi_1.opt)(header), (0, combi_1.opt)(initial));
8180
- const rangeLike = (0, combi_1.seq)("RANGE OF", _1.SimpleFieldChain, (0, combi_1.opt)(header), (0, combi_1.opt)(initial));
8179
+ const rangeType = (0, combi_1.seq)("RANGE OF", _1.TypeName, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
8180
+ const rangeLike = (0, combi_1.seq)("RANGE OF", _1.SimpleFieldChain, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial));
8181
8181
  // a maximum of 15 secondary table keys can be defined
8182
8182
  // "WITH" is not allowed as a field name in keys
8183
8183
  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)))));
@@ -50322,7 +50322,7 @@ class Registry {
50322
50322
  }
50323
50323
  static abaplintVersion() {
50324
50324
  // magic, see build script "version.sh"
50325
- return "2.106.2";
50325
+ return "2.106.3";
50326
50326
  }
50327
50327
  getDDICReferences() {
50328
50328
  return this.ddicReferences;
@@ -64032,17 +64032,17 @@ class NoPrefixesConf extends _basic_rule_config_1.BasicRuleConfig {
64032
64032
  constructor() {
64033
64033
  super(...arguments);
64034
64034
  /** DATA, CLASS-DATA, DATA BEGIN OF, CLASS-DATA BEGIN OF, FINAL(), DATA(), case insensitive regex */
64035
- this.data = "^[lg].?_";
64035
+ this.data = "^[LGM].?_";
64036
64036
  /** STATICS, STATICS BEGIN OF, case insensitive regex */
64037
- this.statics = "";
64037
+ this.statics = "^S.?_";
64038
64038
  /** FIELD-SYMBOLS and inline FIELD-SYMBOLS(), case insensitive regex */
64039
- this.fieldSymbols = "^<l.?_";
64039
+ this.fieldSymbols = "^<[LGM].?_";
64040
64040
  /** CONSTANTS, CONSTANTS BEGIN OF, case insensitive regex */
64041
- this.constants = "^[lg]c_";
64041
+ this.constants = "^[LGM]?C.?_";
64042
64042
  /** TYPES, ENUM, MESH, case insensitive regex */
64043
- this.types = "^ty_";
64043
+ this.types = "^TY_";
64044
64044
  /** importing, exporting, returning and changing parameters, case insensitive regex */
64045
- this.methodParameters = "^[ierc].?_";
64045
+ this.methodParameters = "^[ICER].?_";
64046
64046
  // todo, public localClass: string = "";
64047
64047
  // todo, public localInterface: string = "";
64048
64048
  // todo, public functionModuleParameters: string = "";
@@ -71661,16 +71661,15 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
71661
71661
  exports.WhitespaceEnd = exports.WhitespaceEndConf = void 0;
71662
71662
  const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
71663
71663
  const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
71664
- const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
71665
71664
  const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
71666
71665
  const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
71667
71666
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
71667
+ const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
71668
71668
  class WhitespaceEndConf extends _basic_rule_config_1.BasicRuleConfig {
71669
71669
  }
71670
71670
  exports.WhitespaceEndConf = WhitespaceEndConf;
71671
- class WhitespaceEnd extends _abap_rule_1.ABAPRule {
71671
+ class WhitespaceEnd {
71672
71672
  constructor() {
71673
- super(...arguments);
71674
71673
  this.conf = new WhitespaceEndConf();
71675
71674
  }
71676
71675
  getMetadata() {
@@ -71678,7 +71677,10 @@ class WhitespaceEnd extends _abap_rule_1.ABAPRule {
71678
71677
  key: "whitespace_end",
71679
71678
  title: "Whitespace at end of line",
71680
71679
  shortDescription: `Checks for redundant whitespace at the end of each line.`,
71680
+ extendedInformation: `SMIM and W3MI files are not checked.`,
71681
71681
  tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],
71682
+ badExample: `WRITE 'hello'. `,
71683
+ goodExample: `WRITE 'hello'.`,
71682
71684
  };
71683
71685
  }
71684
71686
  getMessage() {
@@ -71690,17 +71692,25 @@ class WhitespaceEnd extends _abap_rule_1.ABAPRule {
71690
71692
  setConfig(conf) {
71691
71693
  this.conf = conf;
71692
71694
  }
71693
- runParsed(file) {
71695
+ initialize(_reg) {
71696
+ return this;
71697
+ }
71698
+ run(obj) {
71694
71699
  const issues = [];
71695
- const rows = file.getRawRows();
71696
- for (let i = 0; i < rows.length; i++) {
71697
- if (rows[i].endsWith(" ") || rows[i].endsWith(" \r")) {
71698
- const match = / +\r?$/.exec(rows[i]);
71699
- const start = new position_1.Position(i + 1, match.index + 1);
71700
- const end = new position_1.Position(i + 1, rows[i].length + 1);
71701
- const fix = edit_helper_1.EditHelper.deleteRange(file, start, end);
71702
- const issue = issue_1.Issue.atRange(file, start, end, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);
71703
- issues.push(issue);
71700
+ for (const file of obj.getFiles()) {
71701
+ if (obj instanceof objects_1.MIMEObject || obj instanceof objects_1.WebMIME) {
71702
+ continue;
71703
+ }
71704
+ const rows = file.getRawRows();
71705
+ for (let i = 0; i < rows.length; i++) {
71706
+ if (rows[i].endsWith(" ") || rows[i].endsWith(" \r")) {
71707
+ const match = / +\r?$/.exec(rows[i]);
71708
+ const start = new position_1.Position(i + 1, match.index + 1);
71709
+ const end = new position_1.Position(i + 1, rows[i].length + 1);
71710
+ const fix = edit_helper_1.EditHelper.deleteRange(file, start, end);
71711
+ const issue = issue_1.Issue.atRange(file, start, end, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);
71712
+ issues.push(issue);
71713
+ }
71704
71714
  }
71705
71715
  }
71706
71716
  return issues;
@@ -73999,7 +74009,7 @@ class ConstantTranspiler {
73999
74009
  code = `new abap.types.Integer8().set("${concat}")`;
74000
74010
  }
74001
74011
  else if (parsed > 2147483647 || parsed < -2147483648) {
74002
- code = `new abap.types.Integer8().set(${concat})`;
74012
+ code = `new abap.types.Integer8().set("${concat}")`;
74003
74013
  }
74004
74014
  else if (parsed >= -10 && parsed <= 200) {
74005
74015
  code = `abap.IntegerFactory.get(${concat})`;
@@ -87001,6 +87011,8 @@ class OrderedObjParser{
87001
87011
  "copyright" : { regex: /&(copy|#169);/g, val: "©" },
87002
87012
  "reg" : { regex: /&(reg|#174);/g, val: "®" },
87003
87013
  "inr" : { regex: /&(inr|#8377);/g, val: "₹" },
87014
+ "num_dec": { regex: /&#([0-9]{1,7});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 10)) },
87015
+ "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 16)) },
87004
87016
  };
87005
87017
  this.addExternalEntities = addExternalEntities;
87006
87018
  this.parseXml = parseXml;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.8.18",
3
+ "version": "2.8.20",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -26,15 +26,15 @@
26
26
  "author": "abaplint",
27
27
  "license": "MIT",
28
28
  "devDependencies": {
29
- "@abaplint/transpiler": "^2.8.18",
29
+ "@abaplint/transpiler": "^2.8.20",
30
30
  "@types/glob": "^8.1.0",
31
31
  "glob": "=7.2.0",
32
32
  "@types/progress": "^2.0.7",
33
- "@types/node": "^20.11.29",
34
- "@abaplint/core": "^2.106.2",
33
+ "@types/node": "^20.11.30",
34
+ "@abaplint/core": "^2.106.3",
35
35
  "progress": "^2.0.3",
36
- "webpack": "^5.90.3",
36
+ "webpack": "^5.91.0",
37
37
  "webpack-cli": "^5.1.4",
38
- "typescript": "^5.4.2"
38
+ "typescript": "^5.4.3"
39
39
  }
40
40
  }