Add ignore pattern for node_modules in globby search in upgrade cli (#17969)

When passing `gitignore: true` to globby it will start a search for all
.gitignore files, this initial search includes node_modules making it
hang forever for large monorepos with many files inside node_modules
This commit is contained in:
Tommy D. Rossi 2025-05-12 13:09:40 +02:00 • committed by GitHub
parent 19e2b29c68
commit 5688f0a7ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,6 +71,8 @@ async function run() {
files = await globby(['**/*.css'], {
absolute: true,
gitignore: true,
// gitignore: true will first search for all .gitignore including node_modules folders, this makes the initial search much faster
ignore: ['**/node_modules/**'],
})
}