summaryrefslogtreecommitdiff
path: root/ext/node/polyfills
diff options
context:
space:
mode:
authorMarvin Hagemeister <marvin@deno.com>2024-08-07 18:15:57 +0200
committerGitHub <noreply@github.com>2024-08-07 18:15:57 +0200
commit9d6da1036d80a29862f6bdfb51e6f51eee235c35 (patch)
tree4797a9b4e31337ae171f6c6de83c6db2d15da976 /ext/node/polyfills
parent59c9bd08000b72e01b1a4506edc9954183e886a0 (diff)
fix: `rename` watch event missing (#24893)
This PR ensures that we forward a `rename` event in our file watcher. The rust lib we use combines that with the `modify` event. This fixes a compatibility issue with Node too, which sends the `rename` event as well. Fixes https://github.com/denoland/deno/issues/24880
Diffstat (limited to 'ext/node/polyfills')
-rw-r--r--ext/node/polyfills/_fs/_fs_watch.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/node/polyfills/_fs/_fs_watch.ts b/ext/node/polyfills/_fs/_fs_watch.ts
index acdaff800..eb2cd8bfa 100644
--- a/ext/node/polyfills/_fs/_fs_watch.ts
+++ b/ext/node/polyfills/_fs/_fs_watch.ts
@@ -368,6 +368,8 @@ function convertDenoFsEventToNodeFsEvent(
): NodeFsEventType {
if (kind === "create" || kind === "remove") {
return "rename";
+ } else if (kind === "rename") {
+ return "rename";
} else {
return "change";
}