@abaplint/cli 2.101.28 → 2.101.30

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 +72 -35
  2. package/package.json +7 -7
package/build/cli.js CHANGED
@@ -21668,6 +21668,9 @@ class TypeUtils {
21668
21668
  }
21669
21669
  return source.getLength() === target.getLength();
21670
21670
  }
21671
+ else if (target instanceof basic_1.XStringType) {
21672
+ return false;
21673
+ }
21671
21674
  else if (target instanceof basic_1.IntegerType) {
21672
21675
  if (((_e = source.getAbstractTypeData()) === null || _e === void 0 ? void 0 : _e.derivedFromConstant) === true) {
21673
21676
  return true;
@@ -21717,7 +21720,10 @@ class TypeUtils {
21717
21720
  }
21718
21721
  }
21719
21722
  else if (source instanceof basic_1.XStringType) {
21720
- if (target instanceof basic_1.CLikeType) {
21723
+ if (target instanceof basic_1.CLikeType
21724
+ || target instanceof basic_1.IntegerType
21725
+ || target instanceof basic_1.ObjectReferenceType
21726
+ || target instanceof basic_1.HexType) {
21721
21727
  return false;
21722
21728
  }
21723
21729
  }
@@ -25547,6 +25553,8 @@ class Source {
25547
25553
  switch (tok) {
25548
25554
  case "(":
25549
25555
  case "-":
25556
+ case "+":
25557
+ case "BIT":
25550
25558
  break;
25551
25559
  case "BOOLC":
25552
25560
  {
@@ -27088,22 +27096,22 @@ const dynamic_1 = __webpack_require__(/*! ../expressions/dynamic */ "./node_modu
27088
27096
  const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
27089
27097
  class Assign {
27090
27098
  runSyntax(node, scope, filename) {
27091
- var _a, _b;
27092
- const sources = node.findAllExpressions(Expressions.Source);
27093
- const firstSource = sources[0];
27094
- let sourceType = new source_1.Source().runSyntax(firstSource, scope, filename);
27095
- if (sourceType === undefined || ((_a = node.findDirectExpression(Expressions.AssignSource)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Dynamic))) {
27099
+ var _a, _b, _c;
27100
+ const sources = ((_a = node.findDirectExpression(Expressions.AssignSource)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.Source)) || [];
27101
+ const theSource = sources[sources.length - 1];
27102
+ let sourceType = new source_1.Source().runSyntax(theSource, scope, filename);
27103
+ if (sourceType === undefined || ((_b = node.findDirectExpression(Expressions.AssignSource)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.Dynamic))) {
27096
27104
  sourceType = new basic_1.VoidType("DynamicAssign");
27097
27105
  }
27098
- for (const d of ((_b = node.findDirectExpression(Expressions.AssignSource)) === null || _b === void 0 ? void 0 : _b.findAllExpressions(Expressions.Dynamic)) || []) {
27106
+ for (const d of ((_c = node.findDirectExpression(Expressions.AssignSource)) === null || _c === void 0 ? void 0 : _c.findAllExpressions(Expressions.Dynamic)) || []) {
27099
27107
  new dynamic_1.Dynamic().runSyntax(d, scope, filename);
27100
27108
  }
27101
27109
  const target = node.findDirectExpression(Expressions.FSTarget);
27102
27110
  if (target) {
27103
27111
  new fstarget_1.FSTarget().runSyntax(target, scope, filename, sourceType);
27104
27112
  }
27105
- for (const s of sources) {
27106
- if (s === firstSource) {
27113
+ for (const s of node.findAllExpressions(Expressions.Source)) {
27114
+ if (s === theSource) {
27107
27115
  continue;
27108
27116
  }
27109
27117
  new source_1.Source().runSyntax(s, scope, filename);
@@ -40962,7 +40970,11 @@ class Hover {
40962
40970
  return { kind: LServer.MarkupKind.Markdown, value: "String Template" };
40963
40971
  }
40964
40972
  else if (found.token instanceof Tokens.Comment) {
40965
- return { kind: LServer.MarkupKind.Markdown, value: "Comment" };
40973
+ let type = "Comment";
40974
+ if (found.token.getStr().startsWith(`"!`)) {
40975
+ type = "ABAP Doc Comment";
40976
+ }
40977
+ return { kind: LServer.MarkupKind.Markdown, value: type };
40966
40978
  }
40967
40979
  const lookup = _lookup_1.LSPLookup.lookup(found, this.reg, obj);
40968
40980
  if (lookup === null || lookup === void 0 ? void 0 : lookup.hover) {
@@ -48453,7 +48465,7 @@ class Registry {
48453
48465
  }
48454
48466
  static abaplintVersion() {
48455
48467
  // magic, see build script "version.sh"
48456
- return "2.101.28";
48468
+ return "2.101.30";
48457
48469
  }
48458
48470
  getDDICReferences() {
48459
48471
  return this.ddicReferences;
@@ -48771,7 +48783,9 @@ class SevenBitAscii {
48771
48783
  shortDescription: `Only allow characters from the 7bit ASCII set.`,
48772
48784
  extendedInformation: `https://docs.abapopenchecks.org/checks/05/
48773
48785
 
48774
- Checkes files with extension ".abap" and ".asddls"`,
48786
+ https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencharacter_set_guidl.htm
48787
+
48788
+ Checkes files with extensions ".abap" and ".asddls"`,
48775
48789
  tags: [_irule_1.RuleTag.SingleFile],
48776
48790
  };
48777
48791
  }
@@ -57093,7 +57107,7 @@ class FunctionModuleRecommendationsConf extends _basic_rule_config_1.BasicRuleCo
57093
57107
  /** Tuple of Function Module Name to be replaced, the recommended alternative and
57094
57108
  * the version from which the recommendation is valid.*/
57095
57109
  this.recommendations = [
57096
- { name: "CALCULATE_HASH_FOR_RAW", replace: "use CL_ABAP_HMAC" },
57110
+ { name: "CALCULATE_HASH_FOR_RAW", replace: "use CL_ABAP_HMAC or CL_ABAP_MESSAGE_DIGEST" },
57097
57111
  { name: "ECATT_CONV_XSTRING_TO_STRING", replace: "use CL_BINARY_CONVERT" },
57098
57112
  { name: "F4_FILENAME", replace: "use CL_GUI_FRONTEND_SERVICES" },
57099
57113
  { name: "FUNCTION_EXISTS", replace: "surround with try-catch CX_SY_DYN_CALL_ILLEGAL_METHOD instead" },
@@ -57102,10 +57116,11 @@ class FunctionModuleRecommendationsConf extends _basic_rule_config_1.BasicRuleCo
57102
57116
  { name: "GUID_CREATE", replace: "use CL_SYSTEM_UUID" },
57103
57117
  { name: "IGN_TIMESTAMP_DIFFERENCE", replace: "use CL_ABAP_TSTMP" },
57104
57118
  { name: "IGN_TIMESTAMP_PLUSMINUS", replace: "use CL_ABAP_TSTMP" },
57119
+ { name: "ISM_SD_GET PRICING CONDITIONS", replace: "use CL_PRC_RESULT_FACTORY as per note 2220005" },
57105
57120
  { name: "JOB_CREATE", replace: "use CL_BP_ABAP_JOB" },
57106
57121
  { name: "JOB_SUBMIT", replace: "use CL_BP_ABAP_JOB" },
57107
- { name: "POPUP_TO_DECIDE", replace: "use POPUP_TO_CONFIRM" },
57108
57122
  { name: "POPUP_TO_CONFIRM_STEP", replace: "use POPUP_TO_CONFIRM" },
57123
+ { name: "POPUP_TO_DECIDE", replace: "use POPUP_TO_CONFIRM" },
57109
57124
  { name: "POPUP_TO_GET_VALUE", replace: "use POPUP_GET_VALUES" },
57110
57125
  { name: "REUSE_ALV_GRID_DISPLAY", replace: "use CL_SALV_TABLE=>FACTORY or CL_GUI_ALV_GRID" },
57111
57126
  { name: "ROUND", replace: "use built in function: round()" },
@@ -61045,7 +61060,7 @@ class MSAGConsistency {
61045
61060
  key: "msag_consistency",
61046
61061
  title: "MSAG consistency check",
61047
61062
  shortDescription: `Checks the validity of messages in message classes`,
61048
- extendedInformation: `Message numbers must be 3 digits, and message text must not be empty`,
61063
+ extendedInformation: `Message numbers must be 3 digits, message text must not be empty, no message number duplicates`,
61049
61064
  };
61050
61065
  }
61051
61066
  getDescription(reason) {
@@ -61065,6 +61080,7 @@ class MSAGConsistency {
61065
61080
  if (!(obj instanceof objects_1.MessageClass)) {
61066
61081
  return [];
61067
61082
  }
61083
+ const numbers = new Set();
61068
61084
  for (const message of obj.getMessages()) {
61069
61085
  // todo, get the right positions in xml file
61070
61086
  if (!message.getNumber().match(/\d\d\d/)) {
@@ -61079,6 +61095,16 @@ class MSAGConsistency {
61079
61095
  const issue = issue_1.Issue.atPosition(obj.getFiles()[0], position, text, this.getMetadata().key, this.conf.severity);
61080
61096
  issues.push(issue);
61081
61097
  }
61098
+ const num = message.getNumber();
61099
+ if (numbers.has(num)) {
61100
+ const text = "Duplicate message number " + num;
61101
+ const position = new position_1.Position(1, 1);
61102
+ const issue = issue_1.Issue.atPosition(obj.getFiles()[0], position, text, this.getMetadata().key, this.conf.severity);
61103
+ issues.push(issue);
61104
+ }
61105
+ else {
61106
+ numbers.add(num);
61107
+ }
61082
61108
  }
61083
61109
  return issues;
61084
61110
  }
@@ -62207,6 +62233,16 @@ POSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.ht
62207
62233
  OCCURENCES: check for OCCURENCES vs OCCURRENCES
62208
62234
 
62209
62235
  CLIENT SPECIFIED, from 754: https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapselect_client_obsolete.htm`,
62236
+ badExample: `REFRESH itab.
62237
+
62238
+ COMPUTE foo = 2 + 2.
62239
+
62240
+ MULTIPLY lv_foo BY 2.
62241
+
62242
+ INTERFACE intf LOAD.
62243
+
62244
+ IF foo IS SUPPLIED.
62245
+ ENDIF.`,
62210
62246
  };
62211
62247
  }
62212
62248
  getConfig() {
@@ -80743,27 +80779,27 @@ module.exports = require("zlib");
80743
80779
  __webpack_require__.r(__webpack_exports__);
80744
80780
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
80745
80781
  /* harmony export */ Chalk: () => (/* binding */ Chalk),
80746
- /* harmony export */ backgroundColorNames: () => (/* reexport safe */ _ansi_styles__WEBPACK_IMPORTED_MODULE_0__.backgroundColorNames),
80747
- /* harmony export */ backgroundColors: () => (/* reexport safe */ _ansi_styles__WEBPACK_IMPORTED_MODULE_0__.backgroundColorNames),
80782
+ /* harmony export */ backgroundColorNames: () => (/* reexport safe */ _ansi_styles__WEBPACK_IMPORTED_MODULE_1__.backgroundColorNames),
80783
+ /* harmony export */ backgroundColors: () => (/* reexport safe */ _ansi_styles__WEBPACK_IMPORTED_MODULE_1__.backgroundColorNames),
80748
80784
  /* harmony export */ chalkStderr: () => (/* binding */ chalkStderr),
80749
- /* harmony export */ colorNames: () => (/* reexport safe */ _ansi_styles__WEBPACK_IMPORTED_MODULE_0__.colorNames),
80750
- /* harmony export */ colors: () => (/* reexport safe */ _ansi_styles__WEBPACK_IMPORTED_MODULE_0__.colorNames),
80785
+ /* harmony export */ colorNames: () => (/* reexport safe */ _ansi_styles__WEBPACK_IMPORTED_MODULE_1__.colorNames),
80786
+ /* harmony export */ colors: () => (/* reexport safe */ _ansi_styles__WEBPACK_IMPORTED_MODULE_1__.colorNames),
80751
80787
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
80752
- /* harmony export */ foregroundColorNames: () => (/* reexport safe */ _ansi_styles__WEBPACK_IMPORTED_MODULE_0__.foregroundColorNames),
80753
- /* harmony export */ foregroundColors: () => (/* reexport safe */ _ansi_styles__WEBPACK_IMPORTED_MODULE_0__.foregroundColorNames),
80754
- /* harmony export */ modifierNames: () => (/* reexport safe */ _ansi_styles__WEBPACK_IMPORTED_MODULE_0__.modifierNames),
80755
- /* harmony export */ modifiers: () => (/* reexport safe */ _ansi_styles__WEBPACK_IMPORTED_MODULE_0__.modifierNames),
80788
+ /* harmony export */ foregroundColorNames: () => (/* reexport safe */ _ansi_styles__WEBPACK_IMPORTED_MODULE_1__.foregroundColorNames),
80789
+ /* harmony export */ foregroundColors: () => (/* reexport safe */ _ansi_styles__WEBPACK_IMPORTED_MODULE_1__.foregroundColorNames),
80790
+ /* harmony export */ modifierNames: () => (/* reexport safe */ _ansi_styles__WEBPACK_IMPORTED_MODULE_1__.modifierNames),
80791
+ /* harmony export */ modifiers: () => (/* reexport safe */ _ansi_styles__WEBPACK_IMPORTED_MODULE_1__.modifierNames),
80756
80792
  /* harmony export */ supportsColor: () => (/* binding */ stdoutColor),
80757
80793
  /* harmony export */ supportsColorStderr: () => (/* binding */ stderrColor)
80758
80794
  /* harmony export */ });
80759
- /* harmony import */ var _ansi_styles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./vendor/ansi-styles/index.js */ "./node_modules/chalk/source/vendor/ansi-styles/index.js");
80760
- /* harmony import */ var _supports_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! #supports-color */ "./node_modules/chalk/source/vendor/supports-color/index.js");
80795
+ /* harmony import */ var _ansi_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./vendor/ansi-styles/index.js */ "./node_modules/chalk/source/vendor/ansi-styles/index.js");
80796
+ /* harmony import */ var _supports_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! #supports-color */ "./node_modules/chalk/source/vendor/supports-color/index.js");
80761
80797
  /* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utilities.js */ "./node_modules/chalk/source/utilities.js");
80762
80798
 
80763
80799
 
80764
80800
 
80765
80801
 
80766
- const {stdout: stdoutColor, stderr: stderrColor} = _supports_color__WEBPACK_IMPORTED_MODULE_1__["default"];
80802
+ const {stdout: stdoutColor, stderr: stderrColor} = _supports_color__WEBPACK_IMPORTED_MODULE_0__["default"];
80767
80803
 
80768
80804
  const GENERATOR = Symbol('GENERATOR');
80769
80805
  const STYLER = Symbol('STYLER');
@@ -80811,7 +80847,7 @@ function createChalk(options) {
80811
80847
 
80812
80848
  Object.setPrototypeOf(createChalk.prototype, Function.prototype);
80813
80849
 
80814
- for (const [styleName, style] of Object.entries(_ansi_styles__WEBPACK_IMPORTED_MODULE_0__["default"])) {
80850
+ for (const [styleName, style] of Object.entries(_ansi_styles__WEBPACK_IMPORTED_MODULE_1__["default"])) {
80815
80851
  styles[styleName] = {
80816
80852
  get() {
80817
80853
  const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
@@ -80832,21 +80868,21 @@ styles.visible = {
80832
80868
  const getModelAnsi = (model, level, type, ...arguments_) => {
80833
80869
  if (model === 'rgb') {
80834
80870
  if (level === 'ansi16m') {
80835
- return _ansi_styles__WEBPACK_IMPORTED_MODULE_0__["default"][type].ansi16m(...arguments_);
80871
+ return _ansi_styles__WEBPACK_IMPORTED_MODULE_1__["default"][type].ansi16m(...arguments_);
80836
80872
  }
80837
80873
 
80838
80874
  if (level === 'ansi256') {
80839
- return _ansi_styles__WEBPACK_IMPORTED_MODULE_0__["default"][type].ansi256(_ansi_styles__WEBPACK_IMPORTED_MODULE_0__["default"].rgbToAnsi256(...arguments_));
80875
+ return _ansi_styles__WEBPACK_IMPORTED_MODULE_1__["default"][type].ansi256(_ansi_styles__WEBPACK_IMPORTED_MODULE_1__["default"].rgbToAnsi256(...arguments_));
80840
80876
  }
80841
80877
 
80842
- return _ansi_styles__WEBPACK_IMPORTED_MODULE_0__["default"][type].ansi(_ansi_styles__WEBPACK_IMPORTED_MODULE_0__["default"].rgbToAnsi(...arguments_));
80878
+ return _ansi_styles__WEBPACK_IMPORTED_MODULE_1__["default"][type].ansi(_ansi_styles__WEBPACK_IMPORTED_MODULE_1__["default"].rgbToAnsi(...arguments_));
80843
80879
  }
80844
80880
 
80845
80881
  if (model === 'hex') {
80846
- return getModelAnsi('rgb', level, type, ..._ansi_styles__WEBPACK_IMPORTED_MODULE_0__["default"].hexToRgb(...arguments_));
80882
+ return getModelAnsi('rgb', level, type, ..._ansi_styles__WEBPACK_IMPORTED_MODULE_1__["default"].hexToRgb(...arguments_));
80847
80883
  }
80848
80884
 
80849
- return _ansi_styles__WEBPACK_IMPORTED_MODULE_0__["default"][type][model](...arguments_);
80885
+ return _ansi_styles__WEBPACK_IMPORTED_MODULE_1__["default"][type][model](...arguments_);
80850
80886
  };
80851
80887
 
80852
80888
  const usedModels = ['rgb', 'hex', 'ansi256'];
@@ -80856,7 +80892,7 @@ for (const model of usedModels) {
80856
80892
  get() {
80857
80893
  const {level} = this;
80858
80894
  return function (...arguments_) {
80859
- const styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), _ansi_styles__WEBPACK_IMPORTED_MODULE_0__["default"].color.close, this[STYLER]);
80895
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), _ansi_styles__WEBPACK_IMPORTED_MODULE_1__["default"].color.close, this[STYLER]);
80860
80896
  return createBuilder(this, styler, this[IS_EMPTY]);
80861
80897
  };
80862
80898
  },
@@ -80867,7 +80903,7 @@ for (const model of usedModels) {
80867
80903
  get() {
80868
80904
  const {level} = this;
80869
80905
  return function (...arguments_) {
80870
- const styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), _ansi_styles__WEBPACK_IMPORTED_MODULE_0__["default"].bgColor.close, this[STYLER]);
80906
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), _ansi_styles__WEBPACK_IMPORTED_MODULE_1__["default"].bgColor.close, this[STYLER]);
80871
80907
  return createBuilder(this, styler, this[IS_EMPTY]);
80872
80908
  };
80873
80909
  },
@@ -81282,6 +81318,7 @@ __webpack_require__.r(__webpack_exports__);
81282
81318
 
81283
81319
 
81284
81320
  // From: https://github.com/sindresorhus/has-flag/blob/main/index.js
81321
+ /// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {
81285
81322
  function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : node_process__WEBPACK_IMPORTED_MODULE_0__.argv) {
81286
81323
  const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
81287
81324
  const position = argv.indexOf(prefix + flag);
@@ -81390,7 +81427,7 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
81390
81427
  }
81391
81428
 
81392
81429
  if ('CI' in env) {
81393
- if ('GITHUB_ACTIONS' in env) {
81430
+ if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) {
81394
81431
  return 3;
81395
81432
  }
81396
81433
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.101.28",
3
+ "version": "2.101.30",
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.101.28",
41
+ "@abaplint/core": "^2.101.30",
42
42
  "@types/chai": "^4.3.5",
43
43
  "@types/glob": "^7.2.0",
44
44
  "@types/minimist": "^1.2.2",
45
45
  "@types/mocha": "^10.0.1",
46
- "@types/node": "^20.3.2",
46
+ "@types/node": "^20.3.3",
47
47
  "@types/progress": "^2.0.5",
48
48
  "chai": "^4.3.7",
49
- "chalk": "^5.2.0",
50
- "eslint": "^8.43.0",
49
+ "chalk": "^5.3.0",
50
+ "eslint": "^8.44.0",
51
51
  "glob": "^7.2.3",
52
52
  "json5": "^2.2.3",
53
53
  "memfs": "^4.2.0",
54
54
  "minimist": "^1.2.8",
55
55
  "mocha": "^10.2.0",
56
56
  "progress": "^2.0.3",
57
- "typescript": "^5.1.5",
58
- "webpack": "^5.88.0",
57
+ "typescript": "^5.1.6",
58
+ "webpack": "^5.88.1",
59
59
  "webpack-cli": "^5.1.4",
60
60
  "xml-js": "^1.6.11"
61
61
  },