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

fast-glob@3.2.0 uses an outdated version of picomatch with Yarn #253

Closed
anilanar opened this issue Feb 15, 2020 · 7 comments
Closed

fast-glob@3.2.0 uses an outdated version of picomatch with Yarn #253

anilanar opened this issue Feb 15, 2020 · 7 comments

Comments

@anilanar
Copy link

Environment

  • OS Version: MacOS
  • Node.js Version: 12.14.0

There was a regression in https://github.com/dotansimha/graphql-code-generator and after investigating the issue, I've concluded that there's a regression in fast-glob@3.2.0.

You can see the original issue here, which has a reproduction in codesandbox: dotansimha/graphql-code-generator#3512

The problem:

export function getPatternParts(pattern: Pattern, options: MicromatchOptions): Pattern[] {
const info = micromatch.scan(pattern, {
...options,
parts: true
});
// See micromatch/picomatch#58 for more details
if (info.parts.length === 0) {
return [pattern];
}
return info.parts;
}

With micromatch@4.0.2 (latest version), info doesn't seem to have a parts property.

@anilanar
Copy link
Author

Could this be a further problem down the rabbit hole in micromatch -> picomatch?

@jonschlinkert
Copy link

@mrmlnc let me know if you need me to do something to fix this. I can push up a patch if you need me to and can give me guidance on what needs to be fixed, but I won't have much time to debug until Tuesday morning.

Or ping me if you want me to add you to the repo and npm -- we've collaborated a lot over the past couple of years, I'd be happy to add you.

@mrmlnc mrmlnc self-assigned this Feb 16, 2020
@mrmlnc
Copy link
Owner

mrmlnc commented Feb 16, 2020

Additional case:

Looks like we got a combo.

Initial state:

fast-glob → micromatch@^4.0.2 → picomatch@^2.0.5

Something inside the graphql-code-generator also requires the picomatch version. But I can't see anywhere declaration with ~. It seems that yarn does not update transitive dependencies unnecessarily (npm do it — https://github.com/zaripych/node-op/pull/59/files).

And, yeap, yarn does not update transitive dependencies (1, 2).

To avoid this situation we need:

  • Require picomatch@^2.2.1 inside micromatch. PR → here
  • Require micromatch@4.x.x inside fast-glob.

@ivan-kleshnin
Copy link

Not sure if it's the same issue but fast-glob 3.2.0 doesn't work with simplest patterns (like a single asterisk) for me. Sorry for spamming but the library is broken at the moment.

@mrmlnc
Copy link
Owner

mrmlnc commented Feb 17, 2020

@ivan-kleshnin, please, file your issue into separated issue if you do not use yarn. I don't see any problems in addition described in this issue (for a limited number of yarn users with yarn.lock).

@mrmlnc mrmlnc changed the title Regression with 3.2.0? fast-glob@3.2.0 uses an outdated version of picomatch with Yarn Feb 17, 2020
@mrmlnc
Copy link
Owner

mrmlnc commented Feb 17, 2020

I'm rolled back the fast-glob@3.2.0 version to fast-glob@3.1.1 in npm. Wait for the micromatch package release.

@mrmlnc
Copy link
Owner

mrmlnc commented Feb 20, 2020

Temporarily fixed on the side of this package.

Release:

https://github.com/mrmlnc/fast-glob/releases/tag/3.2.1

Issue:

#256

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

No branches or pull requests

4 participants