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
Fix some path / glob problems #4867
Conversation
@@ -118,6 +118,7 @@ | |||
"cosmiconfig": "^6.0.0", | |||
"debug": "^4.1.1", | |||
"execall": "^2.0.0", | |||
"fast-glob": "^3.2.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already a dependency of globby
, so it's not really a new dependency here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just note - prettier and many other tools remove globby
and use fast-glob
directly, maybe we can do same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh interesting! That could be a good follow-up PR.
It would need to be a breaking change, I think. As globbyOptions
is a config option for stylelint. globby
has a couple of options that aren't supported in fast-glob
. Though I'd guess few people are using any of the globby-only option..
Some of the fixture paths are invalid on Windows. Will update. |
`with spaces`, | ||
`extglob!(s)`, | ||
`got!negate/negate`, | ||
// `extglob+(s)`, // Note: +'s cause errors. Ignoring until it becomes a problem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious, what's the error here? Should we document that there's a problem with the +
character?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I should have made a note of it. The +
seemed to be escaped differently for this case, causing the expected match to fail.
I can't remember the specific details, but I think I tracked it down to somewhere in one of globby's dependencies. I thought I'd read an issue that described it, but now I can't find it 🤷
It seemed like enough of an edge-case that we can skip it for now, and investigate later if it becomes a problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic!
* master: (34 commits) Update CHANGELOG.md Fix double-slash disable comments when followed by another comment (#4913) Update CHANGELOG.md (#4916) 13.7.0 Prepare 13.7.0 Prepare changelog Update dependencies Update CHANGELOG.md Deprecate *-blacklist/*-requirelist/*-whitelist (#4892) Fix some path / glob problems (#4867) Update CHANGELOG.md Add a reportDescriptionlessDisables flag (#4907) Fix CHANGELOG.md format via Prettier (#4910) Fix callbacks in tests (#4903) Update CHANGELOG.md Fix false positives for trailing combinator in selector-combinator-space-after (#4878) Add coc-stylelint (#4901) Update CHANGELOG.md Add support for *.cjs config files (#4905) Add a reportDisables secondary option (#4897) ...
#4521
Also:
+
character being ignored #4211It's an alternate take on this PR: #4863
The main behaviour change is:
This is broadly the approach used in ESLint, mentioned in #4388 (comment). It closes #4193.
This PR adds passing tests for most of the other problems reported in the above issues. I wasn't able to replicate some of the reported issues. They might be platform-specific, or may have been fixed in dependencies.
This doesn't fix #4855, but I'll add a comment on that issue instead.