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

Avoiding https://github.com/mrmlnc/fast-glob/issues/158 #209

Merged
merged 5 commits into from
May 3, 2020
Merged

Conversation

tmcdos
Copy link
Contributor

@tmcdos tmcdos commented Apr 21, 2020

This PR contains a:

  • [x ] bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

I often name my project folders using the pattern/scheme of Client name (project name) - first the name of the client and then in braces the name of his/her project.
However, as described in mrmlnc/fast-glob#158 this raises a problem - even if I use globbyOptions: {extension: false, extglob: false} the problem persists. The solution is to properly escape all symbols inside the context which are treated specially by Fast-Glob - but leave them as is in the actual glob pattern(s) in files.
I am not sure whether my implementation is the optimal one but I am open to discussion.

Breaking Changes

This PR is not supposed to break anything - only to handle some edge cases.

Additional Info

I am using the plugin like this (inside vue.config.js)

    config.plugin('stylelintVue')
      .use(require('stylelint-webpack-plugin'),
        [
          {
            context: path.resolve(__dirname, 'src'),
            files: ['**/*.vue', '**/*.css', '**/*.scss'],
            globbyOptions: {extension: false, extglob: false}, // this used to work for "fastGlob" 2.2.7 but no more works with 3.2.2 - it does not find anything if the folder name contains brace(s)
            quiet: false, 
            emitErrors: false  
          }
        ]); 

@jsf-clabot
Copy link

jsf-clabot commented Apr 21, 2020

CLA assistant check
All committers have signed the CLA.

@alexander-akait
Copy link
Member

alexander-akait commented Apr 27, 2020

/cc @ricardogobbosouza can you look at this?

src/utils.js Show resolved Hide resolved
@ricardogobbosouza ricardogobbosouza merged commit 14ae30d into webpack-contrib:master May 3, 2020
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.

None yet

4 participants