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

Correctly handle the exclamation mark at the beginning of the pattern #26

Merged
merged 1 commit into from Mar 21, 2020

Conversation

@mrmlnc
Copy link
Contributor

@mrmlnc mrmlnc commented Mar 21, 2020

What is the purpose of this pull request?

This is a fix for mrmlnc/fast-glob#261.

What changes did you make? (Give an overview)

If the pattern has an exclamation mark with escaping at the beginning of the pattern, the base directory is proposed incorrectly.

// Before
\\!dir/*  \\!dir

// After
\\!dir/*  !dir
@mrmlnc
Copy link
Contributor Author

@mrmlnc mrmlnc commented Mar 21, 2020

Wow! Looks like CI is broken and it is not related to my changes.

Travis — ok

Loading

@mrmlnc mrmlnc force-pushed the unescape_exclamation_mark branch from 52151de to a50efe6 Mar 21, 2020
@phated
Copy link
Member

@phated phated commented Mar 21, 2020

Thanks @mrmlnc! I'll get the flakey CI fixed and release this.

By the way, how's fast-glob doing? I am considering it for the next major revision of gulp since we've had so many issues with node-glob.

Loading

@phated
Copy link
Member

@phated phated commented Mar 21, 2020

Figured it out, the new npm broke scripts on windows for some reason. Patched the appveyor CI config to get it to pass. I'll rebase this in. Thanks again.

Loading

@phated phated merged commit 5b09270 into gulpjs:master Mar 21, 2020
1 of 3 checks passed
Loading
@phated
Copy link
Member

@phated phated commented Mar 21, 2020

Published! Thanks again, and if you have a chance, I'd love to hear about fast-glob :)

Loading

@mrmlnc mrmlnc deleted the unescape_exclamation_mark branch Mar 22, 2020
@mrmlnc
Copy link
Contributor Author

@mrmlnc mrmlnc commented Mar 22, 2020

By the way, how's fast-glob doing? I am considering it for the next major revision of gulp since we've had so many issues with node-glob.

Basically, all the «basic» scenarios work successfully (already tested by globby, parcel, prettier, nestjs, stylelint, relay, …). Sometimes there are problems with edge cases.

If you have any questions, I would be happy to answer them.

However, we have a several problems which users notice after switching from node-glob:

  • The root directory does not exist in the results when the onlyFiles option is disabled (mrmlnc/fast-glob#47);
  • Negative patterns don't work if you specify then inside the ignore option (mrmlnc/fast-glob#86).

Just some links:

JFYI: isaacs/node-glob#405

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants