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

feat(path/glob): add caseInsensitive option #854

Merged
merged 8 commits into from
Apr 22, 2021
Merged

feat(path/glob): add caseInsensitive option #854

merged 8 commits into from
Apr 22, 2021

Conversation

lowlighter
Copy link
Contributor

Closes #806

This add a caseInsensitive option to globToRegExp.

When os option (which defaults to current os) is set to "windows", this option will be enabled by default as file system is case insensitive on it

@piscisaureus
Copy link
Member

I'm not convinced 'caseInsensitive' should be enabled on windows by default.

  • Users might be tempted to think that glob will do case folding exactly like windows, which this doesn't.
  • With the advent of WSL there are now case-sensitive directories on my windows box.
  • On mac, we don't perform unicode normalization either.

I think it'd be better to make the default 'case sensitive' everywhere, and make windows users think about it a little harder.

@lowlighter
Copy link
Contributor Author

I think it'd be better to make the default 'case sensitive' everywhere, and make windows users think about it a little harder.

Yes. I changed it to default it to false on all platforms

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kt3k kt3k merged commit e3e642d into denoland:main Apr 22, 2021
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.

[std/fs] expandGlob needs a caseSensitive option
3 participants