@abaplint/cli 2.114.3 → 2.114.5

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 +15 -6
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -29149,7 +29149,9 @@ class StringTemplate {
29149
29149
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
29150
29150
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
29151
29151
  }
29152
- else if ((typeUtils.isCharLike(type) === false && typeUtils.isHexLike(type) === false)
29152
+ else if ((typeUtils.isCharLike(type) === false
29153
+ && typeUtils.isHexLike(type) === false
29154
+ && !(type instanceof basic_1.UTCLongType))
29153
29155
  || type instanceof basic_1.StructureType) {
29154
29156
  const message = "String template, not character like, " + type.constructor.name;
29155
29157
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
@@ -30237,6 +30239,7 @@ class Append {
30237
30239
  if (source) {
30238
30240
  if (targetType !== undefined
30239
30241
  && !(targetType instanceof basic_1.TableType)
30242
+ && !(targetType instanceof basic_1.UnknownType)
30240
30243
  && dataTarget !== target
30241
30244
  && !(targetType instanceof basic_1.VoidType)) {
30242
30245
  const message = `Append, target not a table type (${targetType.constructor.name})`;
@@ -41207,7 +41210,12 @@ class CDSLexer {
41207
41210
  // string handling
41208
41211
  if (mode === Mode.String) {
41209
41212
  build += next;
41210
- if (next === "'") {
41213
+ if (next === "'" && nextNext === "'") {
41214
+ // escaped single quote, continue string
41215
+ build += stream.takeNext();
41216
+ col++;
41217
+ }
41218
+ else if (next === "'") {
41211
41219
  build = result.add(build, row, col, mode);
41212
41220
  mode = Mode.Default;
41213
41221
  }
@@ -42258,7 +42266,7 @@ class CDSString extends combi_1.Expression {
42258
42266
  getRunnable() {
42259
42267
  const abap = (0, combi_1.seq)("abap", ".", (0, combi_1.regex)(/^char'\w'$/));
42260
42268
  // https://stackoverflow.com/a/57754227
42261
- const reg = (0, combi_1.regex)(/^'[A-Za-zÀ-ž\u0370-\u03FF\u0400-\u04FF:\| -_]*'$/);
42269
+ const reg = (0, combi_1.regex)(/^'([A-Za-zÀ-ž\u0370-\u03FF\u0400-\u04FF:\| -_]|'')*'$/);
42262
42270
  return (0, combi_1.altPrio)(reg, abap);
42263
42271
  }
42264
42272
  }
@@ -50600,6 +50608,7 @@ class LockObject extends _abstract_object_1.AbstractObject {
50600
50608
  getAllowedNaming() {
50601
50609
  return {
50602
50610
  maxLength: 16,
50611
+ customRegex: /^(\/[A-Z_\d]{3,8}\/)?E[A-Z0-9_]+$/i,
50603
50612
  allowNamespace: true,
50604
50613
  };
50605
50614
  }
@@ -54989,7 +54998,7 @@ class Registry {
54989
54998
  }
54990
54999
  static abaplintVersion() {
54991
55000
  // magic, see build script "version.sh"
54992
- return "2.114.3";
55001
+ return "2.114.5";
54993
55002
  }
54994
55003
  getDDICReferences() {
54995
55004
  return this.ddicReferences;
@@ -56450,14 +56459,14 @@ class AllowedObjectNaming {
56450
56459
  const name = obj.getName();
56451
56460
  let message = "";
56452
56461
  if (name.length > allowed.maxLength) {
56453
- message = "Name exceeds max length";
56462
+ message = "Name exceeds max length, allowed is " + allowed.maxLength;
56454
56463
  }
56455
56464
  else if (allowed.allowNamespace === false && name.indexOf("/") >= 0) {
56456
56465
  message = "Namespace not allowed for object type";
56457
56466
  }
56458
56467
  else if (allowed.customRegex !== undefined) {
56459
56468
  if (name.match(allowed.customRegex) === null) {
56460
- message = "Name not allowed";
56469
+ message = "Name not allowed, expected to match " + allowed.customRegex.toString();
56461
56470
  }
56462
56471
  }
56463
56472
  else if (name.match(NAME_REGEX) === null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.114.3",
3
+ "version": "2.114.5",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.114.3",
41
+ "@abaplint/core": "^2.114.5",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",