Skip to content

Commit 9c575d4

Browse files
JSMonkpaulmillr
authored andcommitted
Fix Windows version (#821)
* fix(Windows): braces are remove windows path separator. * chore: Add lost path inside array braces. * chore: Test without EPERM for Windows. * chore: Test with event loop ticking. * test: Make max age bigger.
1 parent 3323d59 commit 9c575d4

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,9 @@ _getWatchHelpers(path, depth) {
677677
const getDirParts = (path) => {
678678
if (!hasGlob) return [];
679679
const parts = [];
680-
const expandedPath = braces.expand(path);
680+
const expandedPath = path.includes("{")
681+
? braces.expand(path)
682+
: [path];
681683
expandedPath.forEach((path) => {
682684
parts.push(sysPath.relative(watchPath, path).split(/[\/\\]/));
683685
});

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"is-binary-path": "^2.0.1",
2020
"is-glob": "^4.0.1",
2121
"normalize-path": "^3.0.0",
22-
"readdirp": "github:paulmillr/readdirp"
22+
"readdirp": "github:JSMonk/readdirp"
2323
},
2424
"optionalDependencies": {
2525
"fsevents": "^2.0.3"

test.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,11 @@ const runTests = function(baseopts) {
115115
resolve();
116116
}
117117
intrvl = setInterval(() => {
118-
if (spies.every(isSpyReady)) finish();
118+
process.nextTick(() => {
119+
if (spies.every(isSpyReady)) finish();
120+
});
119121
}, 20);
120-
timeo = setTimeout(finish, 3500);
122+
timeo = setTimeout(finish, 5000);
121123
});
122124
};
123125

0 commit comments

Comments
 (0)