Skip to content

Commit

Permalink
fix: bump deps and fix tests for local dev (#1139)
Browse files Browse the repository at this point in the history
Upgraded tests for node 8
  • Loading branch information
remy authored Dec 4, 2017
1 parent 5a89df6 commit 6d57dac
Show file tree
Hide file tree
Showing 9 changed files with 2,878 additions and 5,529 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ lib-cov
*.pid
*.gz

.vscode/

pids
logs
results
Expand Down
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ language: node_js
notifications:
email: false
node_js:
- 9
- 8
- 7
- 6
- 4
before_install:
- npm i -g npm@^2.0.0
before_script:
- npm prune
- 'curl -Lo travis_after_all.py https://git.io/vLSON'
Expand Down
6 changes: 3 additions & 3 deletions lib/monitor/match.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ function rulesToMonitor(watch, ignore, config) {
// if the url ends with * but not **/* and not *.*
// then convert to **/* - somehow it was missed :-\
if (rule.slice(-4) !== '**/*' &&
rule.slice(-1) === '*' &&
rule.indexOf('*.') === -1) {
rule.slice(-1) === '*' &&
rule.indexOf('*.') === -1) {
rule += '*/*';
}

Expand Down Expand Up @@ -119,7 +119,7 @@ function tryBaseDir(dir) {
if (stat.isFile() || stat.isDirectory()) {
return dir;
}
} catch (e) {}
} catch (e) { }
}

return false;
Expand Down
12 changes: 9 additions & 3 deletions lib/monitor/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var debouncedBus;
bus.on('reset', resetWatchers);

function resetWatchers() {
debug('resetting watchers');
debugRoot('resetting watchers');
watchers.forEach(function (watcher) {
watcher.close();
});
Expand Down Expand Up @@ -49,12 +49,18 @@ function watch() {
ignored = [ignored, dotFilePattern];
}

var watcher = chokidar.watch(dir, {
var watchOptions = {
ignored: ignored,
persistent: true,
usePolling: config.options.legacyWatch || false,
interval: config.options.pollingInterval,
});
};

if (process.env.TEST) {
watchOptions.useFsEvents = false;
}

var watcher = chokidar.watch(dir, watchOptions);

watcher.ready = false;

Expand Down
Loading

0 comments on commit 6d57dac

Please sign in to comment.