Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/platform-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@

Added a `recursive` option to `FileSystem.watch` that allows watching for changes in subdirectories. When set to `true`, the watcher will monitor changes in all nested directories.

Note: The recursive option is only supported on macOS and Windows. On other platforms, it will be ignored.
Note: The `recursive` option behavior depends on the backend implementation. When using `@parcel/watcher` (default), watching is always recursive on all platforms and this option is ignored. When using the Node.js `fs.watch()` fallback, the `recursive` option is supported on all platforms (Node.js v20+).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parcel watcher is not the default


Example:

Expand Down
7 changes: 5 additions & 2 deletions packages/platform/src/FileSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,11 @@ export interface FileSystem {
* By default, only changes to the direct children of the directory are reported.
* Set the `recursive` option to `true` to watch for changes in subdirectories as well.
*
* Note: The `recursive` option is only supported on macOS and Windows.
* On other platforms, it will be ignored.
* Note: The `recursive` option behavior depends on the backend implementation:
* - When using `@parcel/watcher` (default in `@effect/platform-node`):
* Watching is always recursive on all platforms. This option is ignored.
* - When using Node.js `fs.watch()` fallback: The `recursive` option is
* supported on all platforms (Node.js v20+).
*/
readonly watch: (path: string, options?: WatchOptions) => Stream<WatchEvent, PlatformError>
/**
Expand Down
Loading