Don't warn about broad globs in vendor folders #14147
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After shipping the new warning that prevents unexpected scanning of all dependencies in 3.4.8, we noticed that it was firing more often than we wanted to.
The heuristics we added works by finding broad glob patterns (once that contain
/**/
) and when those are found and are the sole pattern used to match a file of a known-large directory, we were showing the warning. The motivation for this is that we have seen time and time again that an incorrect config like/**/*.js
can cause recursive scans through all dependencies including many minified libraries which greatly impacts performance.In #14140, we were adding two known-large directory names:
node_modules
(used by npm)vendor
(used by PHP)The problem with the
vendor
name though is that it is more generic than we would like it and there are legit use cases to have a folder namedvendor
inside your component folder. Additionally, PHP vendors behave a bit differently and it's not super common to have minified build files in that folder (which is one of the main reasons for the slow builds). Because of this, we decided to revert the change forvendor
and only scan fornode_modules
going forward.