Skip to content

Commit

Permalink
Update to latest readdirp.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Apr 15, 2019
1 parent 793639f commit 06214c5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,8 @@ _addPathCloser(path, closer) {
list.push(closer);
}

_readdirp(root, options) {
_readdirp(root, opts) {
const options = Object.assign({type: 'all', alwaysStat: true, lstat: true}, opts);
let stream = readdirp(root, options);
this._streams.add(stream);
stream.once('close', () => {
Expand Down
2 changes: 0 additions & 2 deletions lib/fsevents-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,8 @@ _addToFsEvents(path, transform, forceAdd, priorDepth) {

// scan the contents of the dir
this.fsw._readdirp(wh.watchPath, {
type: 'all',
fileFilter: wh.filterPath,
directoryFilter: wh.filterDir,
lstat: true,
depth: opts.depth - (priorDepth || 0)
}).on('data', (entry) => {
// need to check filterPath on dirs b/c filterDir is less restrictive
Expand Down
2 changes: 0 additions & 2 deletions lib/nodefs-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,11 +409,9 @@ _handleDir(dir, stats, initialAdd, depth, target, wh, realpath, callback) {
const current = new Set();

this.fsw._readdirp(directory, {
type: 'all',
fileFilter: wh.filterPath,
directoryFilter: wh.filterDir,
depth: 0,
lstat: true
}).on('data', (entry) => {
const item = entry.path;
let path = sysPath.join(directory, item);
Expand Down
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2039,7 +2039,7 @@ describe('chokidar', function() {
if (os === 'darwin') {
const FsEventsHandler = require('./lib/fsevents-handler');
if (FsEventsHandler.canUse()) {
// describe('fsevents (native extension)', runTests.bind(this, {useFsEvents: true}));
describe.skip('fsevents (native extension)', runTests.bind(this, {useFsEvents: true}));
}
} else {
}
Expand Down

0 comments on commit 06214c5

Please sign in to comment.