@abaplint/transpiler-cli 2.13.79 → 2.13.80

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/bundle.js +20 -3
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -149,6 +149,24 @@ class FileOperations {
149
149
  }
150
150
  fs.rmSync(p, { recursive: true });
151
151
  }
152
+ /** posix + absolute make glob return forward slashed absolute paths on all
153
+ platforms, but on Windows in fully resolved UNC form, ie. //?/C:/foo.
154
+ path.relative() does not consider //?/C: and C: the same root, and would
155
+ return the full path instead of a relative one, so strip the prefix */
156
+ static stripNamespace(filename) {
157
+ if (filename.startsWith("//?/UNC/")) {
158
+ return "//" + filename.substring("//?/UNC/".length);
159
+ }
160
+ else if (filename.startsWith("//?/")) {
161
+ return filename.substring("//?/".length);
162
+ }
163
+ return filename;
164
+ }
165
+ static globSync(pattern) {
166
+ // backslashes are escape characters in glob patterns, always hand it forward slashes
167
+ const normalized = pattern.split(path.sep).join("/");
168
+ return glob.sync(normalized, { nodir: true, absolute: true, posix: true }).map(f => this.stripNamespace(f));
169
+ }
152
170
  static setupPLimit() {
153
171
  let concurrency = os.cpus().length;
154
172
  if (concurrency > 8) {
@@ -181,7 +199,7 @@ class FileOperations {
181
199
  const folders = Array.isArray(config.input_folder) ? config.input_folder : [config.input_folder];
182
200
  const filesToRead = [];
183
201
  for (const folder of folders) {
184
- for (const filename of glob.sync(folder + "/**", { nodir: true })) {
202
+ for (const filename of this.globSync(folder + "/**")) {
185
203
  if (inputFilters.length > 0 && inputFilters.some(a => a.test(filename)) === false) {
186
204
  skipped++;
187
205
  continue;
@@ -278,7 +296,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
278
296
  Object.defineProperty(exports, "__esModule", ({ value: true }));
279
297
  const fs = __importStar(__webpack_require__(/*! fs */ "fs"));
280
298
  const path = __importStar(__webpack_require__(/*! path */ "path"));
281
- const glob = __importStar(__webpack_require__(/*! glob */ "./node_modules/glob/dist/commonjs/index.min.js"));
282
299
  const childProcess = __importStar(__webpack_require__(/*! child_process */ "child_process"));
283
300
  const os = __importStar(__webpack_require__(/*! os */ "os"));
284
301
  const module_1 = __webpack_require__(/*! module */ "module");
@@ -327,7 +344,7 @@ async function loadLib(config) {
327
344
  const excludeFilters = (lib.exclude_filter ?? []).map(pattern => new RegExp(pattern, "i"));
328
345
  const filesToRead = [];
329
346
  for (const pattern of patterns) {
330
- for (const filename of glob.sync(dir + pattern, { nodir: true })) {
347
+ for (const filename of file_operations_1.FileOperations.globSync(dir + pattern)) {
331
348
  if (filename.endsWith(".clas.testclasses.abap")) {
332
349
  continue;
333
350
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.13.79",
3
+ "version": "2.13.80",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -32,7 +32,7 @@
32
32
  "@types/glob": "^9.0.0",
33
33
  "@types/node": "^26.4.1",
34
34
  "@types/progress": "^2.0.7",
35
- "glob": "=13.0.6",
35
+ "glob": "^13.0.6",
36
36
  "p-limit": "^7.3.2",
37
37
  "progress": "^2.0.3",
38
38
  "ts-json-schema-generator": "^2.9.0",