Skip to content
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

Ability to match glob symlink behavior #97

Open
benmccann opened this issue Feb 25, 2025 · 5 comments
Open

Ability to match glob symlink behavior #97

benmccann opened this issue Feb 25, 2025 · 5 comments

Comments

@benmccann
Copy link
Contributor

I've been trying to switch @vercel/nft over to tinyglobby from glob. There's one failing test and I'm pretty sure it's because of the symlink behavior that glob has

From https://www.npmjs.com/package/glob:

By default, a ** in a pattern will follow 1 symbolic link if it is not the first item in the pattern, or none if it is the first item in the pattern, following the same behavior as Bash.

@SuperchupuDev
Copy link
Owner

at first glance i think it is unlikely this will be added, fdir doesn't give information on whether a file is a symlink and there would need to be quite a lot of manual matching done to achieve this - not to mention it's not the behavior present in globby/fast-glob iirc

@benmccann
Copy link
Contributor Author

Perhaps it could be an option added to fdir...

@SuperchupuDev
Copy link
Owner

maybe, but even then the tinyglobby side of the implementation would likely not be straightforward to add

@benmccann
Copy link
Contributor Author

Perhaps the fdir option could be a limit for number of symlinks to crawl. I don't think anything would have to change on the tinyglobby side then.

@SuperchupuDev
Copy link
Owner

SuperchupuDev commented Feb 27, 2025

that wouldn't just apply to ** patterns though

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

No branches or pull requests

2 participants