@abaplint/cli 2.102.35 → 2.102.37

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 +21 -12
  2. package/package.json +4 -4
package/build/cli.js CHANGED
@@ -1020,7 +1020,7 @@ class Rename {
1020
1020
  }
1021
1021
  const newStr = o.getName().replace(regex, p.newName);
1022
1022
  if (quiet !== true) {
1023
- console.log("Renaming " + o.getName().padEnd(30, " ") + " -> " + newStr);
1023
+ console.log("Renaming " + o.getType() + " " + o.getName().padEnd(30, " ") + " -> " + newStr);
1024
1024
  }
1025
1025
  const result = renamer.rename(o.getType(), o.getName(), newStr);
1026
1026
  result.updatedFiles.forEach(f => { this.updatedFiles.add(f); });
@@ -21762,18 +21762,23 @@ class TypeUtils {
21762
21762
  }
21763
21763
  return true;
21764
21764
  }
21765
- else if (source instanceof basic_1.StructureType && target instanceof basic_1.StructureType) {
21766
- const sourceComponents = source.getComponents();
21767
- const targetComponents = target.getComponents();
21768
- if (sourceComponents.length !== targetComponents.length) {
21769
- return false;
21770
- }
21771
- for (let i = 0; i < sourceComponents.length; i++) {
21772
- if (this.isAssignableStrict(sourceComponents[i].type, targetComponents[i].type) === false) {
21765
+ else if (source instanceof basic_1.StructureType) {
21766
+ if (target instanceof basic_1.StructureType) {
21767
+ const sourceComponents = source.getComponents();
21768
+ const targetComponents = target.getComponents();
21769
+ if (sourceComponents.length !== targetComponents.length) {
21773
21770
  return false;
21774
21771
  }
21772
+ for (let i = 0; i < sourceComponents.length; i++) {
21773
+ if (this.isAssignableStrict(sourceComponents[i].type, targetComponents[i].type) === false) {
21774
+ return false;
21775
+ }
21776
+ }
21777
+ return true;
21778
+ }
21779
+ else if (target instanceof basic_1.CharacterType) {
21780
+ return false;
21775
21781
  }
21776
- return true;
21777
21782
  }
21778
21783
  else if (source instanceof basic_1.Integer8Type) {
21779
21784
  if (target instanceof basic_1.IntegerType || target instanceof basic_1.StringType) {
@@ -21901,6 +21906,9 @@ class TypeUtils {
21901
21906
  else if (target.containsVoid() === true) {
21902
21907
  return true;
21903
21908
  }
21909
+ else if (source instanceof basic_1.StringType && this.structureContainsString(target)) {
21910
+ return false;
21911
+ }
21904
21912
  else if (source instanceof basic_1.IntegerType) {
21905
21913
  return false;
21906
21914
  }
@@ -46771,9 +46779,10 @@ class RenamerHelper {
46771
46779
  renameFiles(obj, oldName, name) {
46772
46780
  const list = [];
46773
46781
  const newName = name.toLowerCase().replace(/\//g, "#");
46782
+ oldName = oldName.toLowerCase().replace(/\//g, "#");
46774
46783
  for (const f of obj.getFiles()) {
46775
46784
  // todo, this is not completely correct, ie. if the URI contains the same directory name as the object name
46776
- const newFilename = f.getFilename().replace(oldName.toLowerCase(), newName.toLowerCase());
46785
+ const newFilename = f.getFilename().replace(oldName, newName);
46777
46786
  list.push(vscode_languageserver_types_1.RenameFile.create(f.getFilename(), newFilename));
46778
46787
  }
46779
46788
  return list;
@@ -48778,7 +48787,7 @@ class Registry {
48778
48787
  }
48779
48788
  static abaplintVersion() {
48780
48789
  // magic, see build script "version.sh"
48781
- return "2.102.35";
48790
+ return "2.102.37";
48782
48791
  }
48783
48792
  getDDICReferences() {
48784
48793
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.102.35",
3
+ "version": "2.102.37",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,16 +38,16 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.102.35",
41
+ "@abaplint/core": "^2.102.37",
42
42
  "@types/chai": "^4.3.6",
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.5.9",
46
+ "@types/node": "^20.6.0",
47
47
  "@types/progress": "^2.0.5",
48
48
  "chai": "^4.3.8",
49
49
  "chalk": "^5.3.0",
50
- "eslint": "^8.48.0",
50
+ "eslint": "^8.49.0",
51
51
  "glob": "^7.2.3",
52
52
  "json5": "^2.2.3",
53
53
  "memfs": "^4.2.1",