Open liuxingbaoyu opened 4 months ago
Thanks for the report. I made a fix in glob-stream that only traverses the glob parent directory, but you are using a glob in the first segment so it will still traverse the node_modules and other directories.
I'm not sure how to fix this easily in our new glob-stream implement, but I believe a workaround would be to separate the glob parts in parens into 3 separate globs.
Thank you for your quick reply! I tried splitting it, unfortunately the issue still exists.🤔
import gulp from "gulp";
const defaultPackagesGlob = function (path) {
return ["./codemods/*", "./packages/*", "./eslint/*"].map(p => p + path);
};
gulp.task("default", function () {
return gulp
.src(defaultPackagesGlob("/src/**/*.d.ts"))
.pipe(gulp.dest("./test"));
});
we met this problem. our code:
function copyLocalesJSON() {
return src('**/locales/*.json', {
cwd: fileURLToPath(PKG_PATH),
ignore: ['**/node_modules/**', '**/dist/**'],
}).pipe(dest(fileURLToPath(DIST_PATH)))
}
and we have a lot of recursively linked node_modules.
I workaround this by force "glob-stream" to be "7.0.0" not "8.2.0"
Before you open this issue, please complete the following tasks:
What were you expecting to happen?
Works like v4
What actually happened?
Stuck in an infinite loop until OOM.
Please give us a sample of your gulpfile
I tried to find a minimal reproduction but failed. So this example needs to be run in the https://github.com/babel/babel repository.
Clone https://github.com/babel/babel and run
yarn
. Then replaceGulpfile.mjs
with the following code and runyarn gulp
to reproduce.Terminal output / screenshots
Please provide the following information:
node -v
): v21.7.3npm -v
): 10.5.0gulp -v
): 5.0.0Additional information