@abaplint/cli 2.113.155 → 2.113.157

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 +20 -12
  2. package/package.json +4 -4
package/build/cli.js CHANGED
@@ -99,6 +99,14 @@ class FileOperations {
99
99
  }
100
100
  fs.rmSync(dir, { recursive: true });
101
101
  }
102
+ static toUnixPath(path) {
103
+ if (os.platform() === "win32") {
104
+ return path.replace(/[\\/]+/g, "/").replace(/^([a-zA-Z]+:|\.\/)/, "");
105
+ }
106
+ else {
107
+ return path;
108
+ }
109
+ }
102
110
  static loadFileNames(arg, error = true) {
103
111
  const files = glob.sync(arg, { nodir: true, absolute: true, posix: true });
104
112
  if (files.length === 0 && error) {
@@ -966,14 +974,10 @@ async function loadDependencies(config, compress, bar, base) {
966
974
  continue;
967
975
  }
968
976
  }
969
- const toUnixPath = (path) => path.replace(/[\\/]+/g, "/").replace(/^([a-zA-Z]+:|\.\/)/, "");
970
977
  if (d.url) {
971
978
  process.stderr.write("Clone: " + d.url + "\n");
972
979
  let dir = fs.mkdtempSync(path.join(os.tmpdir(), "abaplint-"));
973
- if (os.platform() === "win32") {
974
- // must be converted to posix for glob patterns like "/{foo,src}/**/*.*" to work
975
- dir = toUnixPath(dir);
976
- }
980
+ dir = file_operations_1.FileOperations.toUnixPath(dir);
977
981
  let branch = "";
978
982
  if (d.branch) {
979
983
  branch = "-b " + d.branch + " ";
@@ -1163,16 +1167,18 @@ class Rename {
1163
1167
  }
1164
1168
  ////////////////////////
1165
1169
  write(rconfig, base, fs) {
1166
- const outputFolder = base + path.sep + rconfig.output;
1170
+ const outputFolder = base + path.posix.sep + rconfig.output;
1167
1171
  console.log("Base: " + base);
1168
1172
  console.log("Output folder: " + outputFolder);
1169
1173
  file_operations_1.FileOperations.deleteFolderRecursive(outputFolder);
1174
+ const myBase = file_operations_1.FileOperations.toUnixPath(path.resolve(base));
1170
1175
  for (const o of this.reg.getObjects()) {
1171
1176
  if (this.reg.isDependency(o) === true) {
1172
1177
  continue;
1173
1178
  }
1174
1179
  for (const f of o.getFiles()) {
1175
- const n = outputFolder + f.getFilename().replace(base, "");
1180
+ // yea, ffs
1181
+ const n = outputFolder + f.getFilename().replace(myBase, "").replace("//?/C:", "");
1176
1182
  console.log("Write " + n);
1177
1183
  fs.mkdirSync(path.dirname(n), { recursive: true });
1178
1184
  fs.writeFileSync(n, f.getRaw());
@@ -1202,6 +1208,7 @@ class Rename {
1202
1208
  result.updatedFiles.forEach(f => { this.updatedFiles.add(f); });
1203
1209
  result.deletedFiles.forEach(f => { this.deletedFiles.add(f); });
1204
1210
  result.addedFiles.forEach(f => { this.addedFiles.add(f); });
1211
+ break;
1205
1212
  }
1206
1213
  }
1207
1214
  }
@@ -28135,15 +28142,16 @@ class Source {
28135
28142
  }
28136
28143
  case "REF":
28137
28144
  {
28138
- const foundType = this.determineType(node, input, targetType);
28145
+ let foundType = this.determineType(node, input, targetType);
28139
28146
  const s = Source.runSyntax(node.findDirectExpression(Expressions.Source), input);
28140
28147
  if (foundType === undefined && s) {
28141
- return new basic_1.DataReference(s);
28148
+ foundType = new basic_1.DataReference(s);
28142
28149
  }
28143
28150
  else if (foundType) {
28144
- return new basic_1.DataReference(foundType);
28151
+ foundType = new basic_1.DataReference(foundType);
28145
28152
  }
28146
- return undefined;
28153
+ this.addIfInferred(node, input, foundType);
28154
+ return foundType;
28147
28155
  }
28148
28156
  case "FILTER":
28149
28157
  {
@@ -54758,7 +54766,7 @@ class Registry {
54758
54766
  }
54759
54767
  static abaplintVersion() {
54760
54768
  // magic, see build script "version.sh"
54761
- return "2.113.155";
54769
+ return "2.113.157";
54762
54770
  }
54763
54771
  getDDICReferences() {
54764
54772
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.155",
3
+ "version": "2.113.157",
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.113.155",
41
+ "@abaplint/core": "^2.113.156",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",
45
- "@types/node": "^24.2.0",
45
+ "@types/node": "^24.2.1",
46
46
  "@types/progress": "^2.0.7",
47
47
  "chai": "^4.5.0",
48
48
  "p-limit": "^3.1.0",
49
49
  "chalk": "^5.5.0",
50
- "eslint": "^9.32.0",
50
+ "eslint": "^9.33.0",
51
51
  "glob": "^11.0.3",
52
52
  "json5": "^2.2.3",
53
53
  "memfs": "^4.36.0",