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