Skip to content

Commit acc783a

Browse files
SimenBcpojer
authored andcommitted
Upgrade sane and use FSEventsWatcher on Darwin (#3918)
This is to fix regressions with the NodeWatcher on macOS. More info here: amasad/sane#97
1 parent dbd82dc commit acc783a

File tree

3 files changed

+616
-22
lines changed

3 files changed

+616
-22
lines changed

packages/jest-haste-map/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"graceful-fs": "^4.1.11",
1313
"jest-docblock": "^20.0.3",
1414
"micromatch": "^2.3.11",
15-
"sane": "~1.6.0",
15+
"sane": "^2.0.0",
1616
"worker-farm": "^1.3.1"
1717
}
1818
}

packages/jest-haste-map/src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ class HasteMap extends EventEmitter {
568568

569569
const Watcher = canUseWatchman && this._options.useWatchman
570570
? sane.WatchmanWatcher
571-
: sane.NodeWatcher;
571+
: os.platform() === 'darwin' ? sane.FSEventsWatcher : sane.NodeWatcher;
572572
const extensions = this._options.extensions;
573573
const ignorePattern = this._options.ignorePattern;
574574
let changeQueue = Promise.resolve();

0 commit comments

Comments
 (0)