Skip to content

Commit

Permalink
Bump chokidar to v4 (#2347)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme committed Sep 16, 2024
1 parent aa35aa2 commit a957eea
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions lib/src/io/js.dart
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,7 @@ Future<Stream<WatchEvent>> watchDir(String path, {bool poll = false}) {
if (!isNodeJs) {
throw UnsupportedError("watchDir() is only supported on Node.js");
}
var watcher = chokidar.watch(
path, ChokidarOptions(disableGlobbing: true, usePolling: poll));
var watcher = chokidar.watch(path, ChokidarOptions(usePolling: poll));

// Don't assign the controller until after the ready event fires. Otherwise,
// Chokidar will give us a bunch of add events for files that already exist.
Expand Down
3 changes: 1 addition & 2 deletions lib/src/js/chokidar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ class Chokidar {
@JS()
@anonymous
class ChokidarOptions {
external bool? get disableGlobbing;
external bool? get usePolling;

external factory ChokidarOptions({bool? disableGlobbing, bool? usePolling});
external factory ChokidarOptions({bool? usePolling});
}

@JS()
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"name": "sass",
"devDependencies": {
"chokidar": ">=3.0.0 <4.0.0",
"chokidar": "^4.0.0",
"immutable": "^4.0.0",
"intercept-stdout": "^0.1.2"
}
Expand Down
2 changes: 1 addition & 1 deletion package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"node": ">=14.0.0"
},
"dependencies": {
"chokidar": ">=3.0.0 <4.0.0",
"chokidar": "^4.0.0",
"immutable": "^4.0.0",
"source-map-js": ">=0.6.2 <2.0.0"
},
Expand Down

0 comments on commit a957eea

Please sign in to comment.