@abaplint/cli 2.105.22 → 2.105.24

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 +35 -9
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -658,7 +658,14 @@ class Junit {
658
658
  return code.map(str => str).join("\n");
659
659
  }
660
660
  formatFailureMessage(message) {
661
- return message.replace("<", "").replace(">", "");
661
+ let ret = message;
662
+ while (ret.includes("<")) {
663
+ ret = ret.replace("<", "&lt;");
664
+ }
665
+ while (ret.includes(">")) {
666
+ ret = ret.replace(">", "&gt;");
667
+ }
668
+ return ret;
662
669
  }
663
670
  }
664
671
  exports.Junit = Junit;
@@ -22570,7 +22577,8 @@ class TypeUtils {
22570
22577
  }
22571
22578
  return false;
22572
22579
  }
22573
- else if (target instanceof cgeneric_type_1.CGenericType) {
22580
+ else if (target instanceof cgeneric_type_1.CGenericType
22581
+ || target instanceof basic_1.GenericObjectReferenceType) {
22574
22582
  return false;
22575
22583
  }
22576
22584
  else if (target instanceof basic_1.XSequenceType || target instanceof basic_1.XStringType) {
@@ -24340,19 +24348,22 @@ const let_1 = __webpack_require__(/*! ./let */ "./node_modules/@abaplint/core/bu
24340
24348
  class ConvBody {
24341
24349
  runSyntax(node, scope, filename) {
24342
24350
  if (node === undefined) {
24343
- return;
24351
+ throw new Error("ConvBody, node undefined");
24344
24352
  }
24345
24353
  let scoped = false;
24346
24354
  const l = node.findDirectExpression(Expressions.Let);
24347
24355
  if (l) {
24348
24356
  scoped = new let_1.Let().runSyntax(l, scope, filename);
24349
24357
  }
24350
- for (const s of node.findDirectExpressions(Expressions.Source)) {
24351
- new source_1.Source().runSyntax(s, scope, filename);
24358
+ const s = node.findDirectExpression(Expressions.Source);
24359
+ if (s === undefined) {
24360
+ throw new Error("ConvBody, no source found");
24352
24361
  }
24362
+ const sourceType = new source_1.Source().runSyntax(s, scope, filename);
24353
24363
  if (scoped === true) {
24354
24364
  scope.pop(node.getLastToken().getEnd());
24355
24365
  }
24366
+ return sourceType;
24356
24367
  }
24357
24368
  }
24358
24369
  exports.ConvBody = ConvBody;
@@ -26698,6 +26709,7 @@ const _builtin_1 = __webpack_require__(/*! ../_builtin */ "./node_modules/@abapl
26698
26709
  const attribute_chain_1 = __webpack_require__(/*! ./attribute_chain */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/attribute_chain.js");
26699
26710
  const dereference_1 = __webpack_require__(/*! ./dereference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/dereference.js");
26700
26711
  const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
26712
+ const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
26701
26713
  /*
26702
26714
  * Type interference, valid scenarios:
26703
26715
  * typed = VALUE #( ... ). right hand side must follow left hand type
@@ -26781,7 +26793,10 @@ class Source {
26781
26793
  case "CONV":
26782
26794
  {
26783
26795
  const foundType = this.determineType(node, scope, filename, targetType);
26784
- new conv_body_1.ConvBody().runSyntax(node.findDirectExpression(Expressions.ConvBody), scope, filename);
26796
+ const bodyType = new conv_body_1.ConvBody().runSyntax(node.findDirectExpression(Expressions.ConvBody), scope, filename);
26797
+ if (new _type_utils_1.TypeUtils(scope).isAssignable(foundType, bodyType) === false) {
26798
+ throw new Error("CONV: Types not compatible");
26799
+ }
26785
26800
  this.addIfInferred(node, scope, filename, foundType);
26786
26801
  return foundType;
26787
26802
  }
@@ -28227,6 +28242,7 @@ const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_module
28227
28242
  const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
28228
28243
  const fstarget_1 = __webpack_require__(/*! ../expressions/fstarget */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/fstarget.js");
28229
28244
  const inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js");
28245
+ const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
28230
28246
  // todo: issue error for short APPEND if the source is without header line
28231
28247
  class Append {
28232
28248
  runSyntax(node, scope, filename) {
@@ -28269,7 +28285,17 @@ class Append {
28269
28285
  else if (targetType instanceof basic_1.VoidType) {
28270
28286
  rowType = targetType;
28271
28287
  }
28272
- new source_1.Source().runSyntax(source, scope, filename, rowType);
28288
+ const sourceType = new source_1.Source().runSyntax(source, scope, filename, rowType);
28289
+ if (node.findDirectTokenByText("LINES")) {
28290
+ if (new _type_utils_1.TypeUtils(scope).isAssignable(sourceType, targetType) === false) {
28291
+ throw new Error("Incompatible types");
28292
+ }
28293
+ }
28294
+ else {
28295
+ if (new _type_utils_1.TypeUtils(scope).isAssignable(sourceType, rowType) === false) {
28296
+ throw new Error("Incompatible types");
28297
+ }
28298
+ }
28273
28299
  }
28274
28300
  const from = node.findExpressionAfterToken("FROM");
28275
28301
  if (from && from.get() instanceof Expressions.Source) {
@@ -31667,7 +31693,7 @@ class ReadTable {
31667
31693
  }
31668
31694
  else if (t) {
31669
31695
  const targetType = new target_1.Target().runSyntax(t, scope, filename);
31670
- if (new _type_utils_1.TypeUtils(scope).isAssignable(rowType, targetType) === false) {
31696
+ if (new _type_utils_1.TypeUtils(scope).isAssignableStrict(rowType, targetType) === false) {
31671
31697
  throw new Error("Incompatible types");
31672
31698
  }
31673
31699
  }
@@ -51304,7 +51330,7 @@ class Registry {
51304
51330
  }
51305
51331
  static abaplintVersion() {
51306
51332
  // magic, see build script "version.sh"
51307
- return "2.105.22";
51333
+ return "2.105.24";
51308
51334
  }
51309
51335
  getDDICReferences() {
51310
51336
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.105.22",
3
+ "version": "2.105.24",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,12 +38,12 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.105.22",
41
+ "@abaplint/core": "^2.105.24",
42
42
  "@types/chai": "^4.3.12",
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.20",
46
+ "@types/node": "^20.11.22",
47
47
  "@types/progress": "^2.0.7",
48
48
  "chai": "^4.4.1",
49
49
  "chalk": "^5.3.0",