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

Should isDynamicPattern be a replacement for is-glob? #71

Open
benmccann opened this issue Nov 11, 2024 · 6 comments
Open

Should isDynamicPattern be a replacement for is-glob? #71

benmccann opened this issue Nov 11, 2024 · 6 comments
Labels
question Further information is requested

Comments

@benmccann
Copy link
Contributor

I thought it might allow us to get rid of some more dependencies, but it didn't seem to work when I tried swapping them. Not quite sure why the tests are failing, but you can see my attempt here:

benmccann/json-schema-to-typescript@2a79b10#diff-fa8d4e24d8399e8350f1c8bad05df53e8032ea995835bf911507015e2db61cddR5

@SuperchupuDev
Copy link
Owner

i can tell you better if you can provide a minimal repro

@benmccann
Copy link
Contributor Author

It looks like isGlob returns false for undefined and isDynamicPattern crashes

@SuperchupuDev
Copy link
Owner

interesting. what does fast-glob do?

@benmccann
Copy link
Contributor Author

throw new TypeError('Patterns must be a string (non empty) or an array of strings');

@SuperchupuDev
Copy link
Owner

i could make it return false on undefined, but would that be ideal for users?

@benmccann
Copy link
Contributor Author

I think that's pretty reasonable behavior. If it's not a string then you're correctly returning that it's not a glob

@SuperchupuDev SuperchupuDev added the question Further information is requested label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants