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
pull/1086/head
i-c-b 1 year ago committed by GitHub
parent 1d7dc86ec3
commit cb96aa0627
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
"fs": patch
---
Fixes `watch` and `watchImmediate` which previously ignored the `baseDir` parameter.

@ -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,
)?);
}

Loading…
Cancel
Save