@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/index.mjs CHANGED
@@ -841,8 +841,9 @@ function getImportsFromFile(filePath, importPaths, typeImportPaths) {
841
841
  }
842
842
  visit(sourceFile);
843
843
  const importsStartsWithExcludes = [".", "#", "node:"];
844
- const cleanedImports = imports.filter((imp) => !importsStartsWithExcludes.some((exc) => imp.startsWith(exc))).map(getBasePackageName);
845
- const cleanedTypeImports = typeImports.filter((imp) => !importsStartsWithExcludes.some((exc) => imp.startsWith(exc))).map(getBasePackageName);
844
+ const isValidImport = (imp) => !importsStartsWithExcludes.some((exc) => imp.startsWith(exc)) && !imp.includes("*") && !imp.includes("!");
845
+ const cleanedImports = imports.filter(isValidImport).map(getBasePackageName);
846
+ const cleanedTypeImports = typeImports.filter(isValidImport).map(getBasePackageName);
846
847
  for (const imp of cleanedImports) {
847
848
  importPaths[imp] = importPaths[imp] ?? [];
848
849
  importPaths[imp].push(filePath);