Open ghnp5 opened 1 month ago
The previous task copies stuff to that "_delta" folder, inside a mergeStream
(which used to be on merge-stream
, but when I was trying to fix this issue, I had upgraded to ordered-read-streams
, but the same happens).
Seems that what's happening is that at the time "copy-changed" runs, the files aren't ready yet or so.
If I put a "sleep" of 3 seconds, it seems to work now.
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
gulp.task('copy-changed', () => {
return sleep(3000).then(() => {
return gulp.src([path.join(__dirname, 'build\\_delta\\**\\*')], { dot: true })
.pipe(gulp.dest(path.join(__dirname, 'build\\')));
});
});
This used to work before, so I'm not sure why it needs a sleep now.
What were you expecting to happen?
All 840 files should be copied, recursively.
What actually happened?
Only the first few files (sorted alphabetically) of each folder are being copied, instead of all files.
This used to work, but seems broken since v5.
This is happening as the last step of a
gulp.series
, consistently. But if I runnpx gulp copy-changed
, it copies all the files, always.Please give us a sample of your gulpfile
Terminal output / screenshots
Please provide the following information:
node -v
): v22.3.0npm -v
): 10.8.2gulp -v
): CLI version: 3.0.0 Local version: 5.0.0