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

add question mark character to strictRegex #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dlong500
Copy link

@dlong500 dlong500 commented Mar 9, 2021

I'm opening this PR just to start the discussion (per @phated request from gulpjs/glob-parent#39).

There are lots of broken tests as this PR currently stands after adding the question mark character to strictRegex. See the linked issue in glob-parent for context why I think a question mark should be treated as a glob character.

@phated
Copy link
Member

phated commented Mar 17, 2021

@jonschlinkert based on the discussion in the other thread. Are we going to support this?

@jonschlinkert
Copy link
Member

jonschlinkert commented Mar 17, 2021

based on the discussion in the other thread. Are we going to support this?

Hey @phated, I just responded here. I think this is something that would need to be solved in del or fast-glob, please let me know if I misunderstood.

EDIT: @dlong500 I forgot to mention, I don't think you are, but if you do use picomatch directly, instead of using the is-glob library, picomatch has a scan method that returns an object with an isGlob boolean (as well as the glob parent (aka base) and some other useful properties):

const result = picomatch.scan('!./foo/*.js');
console.log(result);
{ prefix: '!./',
  input: '!./foo/*.js',
  start: 3,
  base: 'foo',
  glob: '*.js',
  isBrace: false,
  isBracket: false,
  isGlob: true,
  isExtglob: false,
  isGlobstar: false,
  negated: true }

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.

3 participants