floatdrop / gulp-watch

Watch, that actually is an endless stream
MIT License
642 stars 99 forks source link

Watched unexpected filepath with file match on depth 1 #280

Open nikcub opened 7 years ago

nikcub commented 7 years ago

This is a weird bug - it likely resides in the deps somewhere. When you setup a glob with `./directory/*/filename' it matches symlinked foldeers further down into the tree

As a fix I added '!./directory/*/node_modules/**/*'

Is there actually a bug here or am I missing something? I can take a look at it myself - i'm running lerna with packages and the watch task here was to update the package symlinks whenever package.json is changed

Node.js version: v6.10.0 darwin x64 gulp-watch version: 4.3.11 Globs: ["./packages/*/package.json"] Filepath: /Users/user/project/packages/api-auth/node_modules/@private/package/path.js Event: change Process CWD: /Users/user/project Options:

{
  "events": [
    "add",
    "change",
    "unlink"
  ],
  "ignoreInitial": true,
  "readDelay": 10,
  "debounceDelay": 500
}