gulpjs / glob-watcher

Watch globs and execute a function upon change, with intelligent defaults for debouncing and queueing.
MIT License
80 stars 59 forks source link

When there is a midline, the watch result is wrong. #63

Open sirzdy opened 4 years ago

sirzdy commented 4 years ago

When there is a midline, the watch result is wrong.

Please give us a sample of your gulpfile

var gulp = require(‘gulp');

gulp.task('watch', series(() => {
  watch([
    'src/**/*',
  ], {
    ignored: [
      'src/abc/**/*',
    ]
  }, () => {
    return gulp.src('src/**/*')
      .pipe(gulp.dest('es'));
  }).on('all', (stats, file) => {
    console.log(`File [${file}] ${stats}`);
  })
}));

What were you expecting to happen?

src/abc-def/index.js should be watched

What actually happened?

src/abc-def/index.js is ignored

Additional information

The primary cause is anymatch. see https://github.com/micromatch/anymatch/issues/35

We should update anymatch (the dependencies of glob-watcher) to the latest, then update glob-watcher (the dependencies of gulp) to the latest

phated commented 4 years ago

Moved to the appropriate issue tracker.

phated commented 7 months ago

@sttk can you take a look at this? I'm not sure if it is still a problem since we've updated dependencies. Perhaps you can add a test?