Skip to content

fix: support @types/picomatch v4 #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2025

Conversation

SuperchupuDev
Copy link
Contributor

@SuperchupuDev SuperchupuDev commented Jul 7, 2025

@types/picomatch v4 makes Matcher have an optional second argument. if set to true, it makes the function return some object and not a string. This breaks fdir's types. To fix this, I replaced it with the already used GlobMatcher type that's identical to Matcher except it doesn't require a second argument (this makes sense to use since, if the second argument was used, fdir would break at runtime since it doesn't expect an object)

Ideally #147 should be merged first to avoid causing merge conflicts on that pr 🙏

For prior work see SuperchupuDev/tinyglobby@f2419f8

Also makes picomatch importing have modern syntax. It doesn't break any compatibility, everything changed works starting from node 10. And fdir supports node 12 and up (manually checked)

@thecodrr thecodrr merged commit 175a702 into thecodrr:master Jul 7, 2025
8 checks passed
@SuperchupuDev SuperchupuDev deleted the fix/types-picomatch-v4 branch July 7, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants