@xylabs/ts-scripts-yarn3 7.4.3 → 7.4.4

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/dist/bin/xy.mjs CHANGED
@@ -749,8 +749,9 @@ function getImportsFromFile(filePath, importPaths, typeImportPaths) {
749
749
  }
750
750
  visit(sourceFile);
751
751
  const importsStartsWithExcludes = [".", "#", "node:"];
752
- const cleanedImports = imports.filter((imp) => !importsStartsWithExcludes.some((exc) => imp.startsWith(exc))).map(getBasePackageName);
753
- const cleanedTypeImports = typeImports.filter((imp) => !importsStartsWithExcludes.some((exc) => imp.startsWith(exc))).map(getBasePackageName);
752
+ const isValidImport = (imp) => !importsStartsWithExcludes.some((exc) => imp.startsWith(exc)) && !imp.includes("*") && !imp.includes("!");
753
+ const cleanedImports = imports.filter(isValidImport).map(getBasePackageName);
754
+ const cleanedTypeImports = typeImports.filter(isValidImport).map(getBasePackageName);
754
755
  for (const imp of cleanedImports) {
755
756
  importPaths[imp] = importPaths[imp] ?? [];
756
757
  importPaths[imp].push(filePath);