fix(fs): rename dir field to base_dir in WatchOptions, fixes #1081 (#1082)

* fix(fs): rename `dir` field to `base_dir` in `WatchOptions`, fixes #1081

* Create fix-fs-watcher-basedir.md
This commit is contained in:
i-c-b
2024-03-16 20:01:49 +10:00
committed by GitHub
parent 1d7dc86ec3
commit cb96aa0627
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"fs": patch
---
Fixes `watch` and `watchImmediate` which previously ignored the `baseDir` parameter.
+2 -2
View File
@@ -75,7 +75,7 @@ fn watch_debounced(on_event: Channel, rx: Receiver<DebounceEventResult>) {
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct WatchOptions {
dir: Option<BaseDirectory>,
base_dir: Option<BaseDirectory>,
recursive: bool,
delay_ms: Option<u64>,
}
@@ -96,7 +96,7 @@ pub async fn watch<R: Runtime>(
&global_scope,
&command_scope,
path,
options.dir,
options.base_dir,
)?);
}