Skip to content

Commit

Permalink
Upgrade sane and use FSEventsWatcher on Darwin (jestjs#3918)
Browse files Browse the repository at this point in the history
This is to fix regressions with the NodeWatcher on macOS.
More info here: amasad/sane#97
  • Loading branch information
SimenB authored and cpojer committed Jun 27, 2017
1 parent d04dc22 commit 9c97c86
Show file tree
Hide file tree
Showing 3 changed files with 616 additions and 22 deletions.
2 changes: 1 addition & 1 deletion packages/jest-haste-map/package.json
Expand Up @@ -12,7 +12,7 @@
"graceful-fs": "^4.1.11",
"jest-docblock": "^20.0.3",
"micromatch": "^2.3.11",
"sane": "~1.6.0",
"sane": "^2.0.0",
"worker-farm": "^1.3.1"
}
}
2 changes: 1 addition & 1 deletion packages/jest-haste-map/src/index.js
Expand Up @@ -568,7 +568,7 @@ class HasteMap extends EventEmitter {

const Watcher = canUseWatchman && this._options.useWatchman
? sane.WatchmanWatcher
: sane.NodeWatcher;
: os.platform() === 'darwin' ? sane.FSEventsWatcher : sane.NodeWatcher;
const extensions = this._options.extensions;
const ignorePattern = this._options.ignorePattern;
let changeQueue = Promise.resolve();
Expand Down

0 comments on commit 9c97c86

Please sign in to comment.