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

upgrade minimatch to @5 #2680

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

m-shaka
Copy link

@m-shaka m-shaka commented Jan 16, 2023

minimatch has fixed some bugs so I upgraded it to v5.
This includes breaking changes, and I think some of them are correct behavior as the glob pattern but I'am not sure that all of them are
https://www.digitalocean.com/community/tools/glob?comments=true&glob=app%2F%2A%2A%2F%2A%2A&matches=false&tests=app%2Fa

My main interest is this bug.

@ljharb
Copy link
Member

ljharb commented Jan 16, 2023

Since this is indeed a breaking change, we're highly unlikely to ever merge it unless there's a very compelling reason.

How does the linked bug impact this plugin?

@ljharb ljharb marked this pull request as draft January 16, 2023 06:20
@m-shaka
Copy link
Author

m-shaka commented Jan 16, 2023

Thank you for your quick response!

For example, I want to loosen rules a bit for testing, but I can't.

module.exports = {
  plugins: ['import'],
  rules: {
    'import/no-internal-modules': [
      'error',
      {
        forbid: ['@src/a/*/**']
      }
    ],
  },
  overrides: [
    {
      files: ['src/**/*.test.ts'],
      rules: {
        'import/no-internal-modules': [
          'error',
          {
            forbid: ['@src/a/*/!(__tests__)/**']
          }
        ],    
      }
    }
  ]
}

As a user, it's very reasonable we can use glob expressions correctly.
I know backward compatibility may concern you as a maintainer. I'll close this PR if there is another workaround

@ljharb
Copy link
Member

ljharb commented Jan 16, 2023

I'm quite unfamiliar with inline glob expressions like that - do they work in gitignore?

As such, I have no idea what you're trying to forbid - and allow - with that glob. Can you elaborate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants