Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to WatchmanWatcher, created singleton WatchmanClient using pr…
…omises (#109) * minor typo fixes * created singleton WatchmanClient, uses promises. Updated WatchmanWatcher to use it instead of direct connection to watchman.Client. Also made WatchmanClient call know WW APIs, instead of trying to handle with EventEmitter. * minor typo fix, removed test code to force call to WC.onEnd for testing reconnect * updated to new code style based on PR feedback from Stef * further updates based on Stef comments * created _watcherMap using Object.create() * fixed up watchman_client to support multiple binary paths, added getInstance(), reworked the client setup mechanism to avoid possible race conditions, cleaned WatchmanWatcher to style standard that Stef Penner mentioned * moved backoffTimes to a function so we can have one obj per watchmanBinaryPath (i.e. WatchmanClient). Also added try/catch in _handleClientAndCheck in case return value from capabilityCheck is somehow malformed or attaching listeners to watchman.Client does not work * removed catch from promise chain, so callers will be responsible for the rejected promise (which they should be anyway)
- Loading branch information