Skip to content

Commit

Permalink
fix: PATH_IGNORES was not working on Windows (#84)
Browse files Browse the repository at this point in the history
`path.to_string_lossy` returns a string including `\\` on Windows so the
`contains` was not working.
  • Loading branch information
sapphi-red authored Feb 2, 2025
1 parent df65c2f commit 7a71131
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl NodeModulesRunner {
let Ok(source_type) = SourceType::from_path(path) else {
continue;
};
if PATH_IGNORES.iter().any(|p| path.to_string_lossy().contains(p)) {
if PATH_IGNORES.iter().any(|p| path.to_string_lossy().replace('\\', "/").contains(p)) {
continue;
}
if source_type.is_typescript_definition() {
Expand Down

0 comments on commit 7a71131

Please sign in to comment.