@uxf/scripts 11.80.0 → 11.83.0

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.
package/README.md CHANGED
@@ -79,4 +79,4 @@ Options
79
79
 
80
80
  Options:
81
81
  --version Show version number
82
- ```
82
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/scripts",
3
- "version": "11.80.0",
3
+ "version": "11.83.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -8,6 +8,7 @@ const join = require("node:path").join;
8
8
 
9
9
  const UXF_PACKAGES_PATH = "node_modules/@uxf";
10
10
  const FILE_EXTENSIONS = ["js", "mjs", "cjs", "ts", "tsx", "d.ts", "mts", "cts", "d.mts", "d.cts"];
11
+ const TEXT_FILE_EXTENSIONS = new Set(FILE_EXTENSIONS.map((e) => (e.startsWith(".") ? e : "." + e)));
11
12
  const TS_CONFIG_PATH = path.resolve(process.cwd(), "tsconfig.json");
12
13
  const TS_CONFIG = existsSync(TS_CONFIG_PATH) ? TS_CONFIG_PATH : undefined;
13
14
 
@@ -34,6 +35,12 @@ function getTsPaths() {
34
35
  * @returns {boolean}
35
36
  */
36
37
  function isAllowedFile(file) {
38
+ // Skip non-text files (e.g., binaries in node_modules)
39
+ const ext = path.extname(file).toLowerCase();
40
+ if (!TEXT_FILE_EXTENSIONS.has(ext)) {
41
+ return false;
42
+ }
43
+
37
44
  return !file.includes("node_modules") || file.includes(UXF_PACKAGES_PATH);
38
45
  }
39
46
 
@@ -254,10 +261,13 @@ async function getFiles(entryPoint, tree) {
254
261
  const fsPath = queue.shift();
255
262
  if (!fsPath || visited.has(fsPath)) continue;
256
263
  visited.add(fsPath);
257
- resolvedFiles.push(fsPath);
258
264
 
259
265
  if (!existsSync(fsPath)) continue;
260
266
 
267
+ if (!isAllowedFile(fsPath)) continue;
268
+
269
+ resolvedFiles.push(fsPath);
270
+
261
271
  // Scan direct imports/requires/exports-from and follow them
262
272
  try {
263
273
  const content = readFileSync(fsPath, "utf8");