<h3 dir="auto">Scenario</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ deno test ${pem_hello} ./hello.ts
$ deno test ${pem_world} ./world.ts
# WILD PERM
$ deno test -A
$ deno run ${perm_hello} ./hello.ts
$ deno run ${perm_hello} ./world.ts
$ deno compile ${perm_hello} ./hello.ts
$ deno compile ${perm_world} ./world.ts"><pre class="notranslate">$ deno <span class="pl-c1">test</span> <span class="pl-smi">${pem_hello}</span> ./hello.ts
$ deno <span class="pl-c1">test</span> <span class="pl-smi">${pem_world}</span> ./world.ts
<span class="pl-c"><span class="pl-c">#</span> WILD PERM</span>
$ deno <span class="pl-c1">test</span> -A
$ deno run <span class="pl-smi">${perm_hello}</span> ./hello.ts
$ deno run <span class="pl-smi">${perm_hello}</span> ./world.ts
$ deno compile <span class="pl-smi">${perm_hello}</span> ./hello.ts
$ deno compile <span class="pl-smi">${perm_world}</span> ./world.ts</pre></div>
<h3 dir="auto">Feat</h3>
<p dir="auto">deno.jsonc</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;perm&quot;: Perm | Path | WhatwgImportId
}"><pre class="notranslate"><span class="pl-kos">{</span>
  <span class="pl-s">"perm"</span>: <span class="pl-v">Perm</span> <span class="pl-c1">|</span> <span class="pl-v">Path</span> <span class="pl-c1">|</span> <span class="pl-v">WhatwgImportId</span>
<span class="pl-kos">}</span></pre></div>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type Perm = Record&lt;PermId, DenoPerm&gt;
type PermId = ImportMapId | PlaceHolderImportId | WhatwgImportId;"><pre class="notranslate"><span class="pl-k">type</span> <span class="pl-smi">Perm</span> <span class="pl-c1">=</span> <span class="pl-smi">Record</span><span class="pl-kos">&lt;</span><span class="pl-smi">PermId</span><span class="pl-kos">,</span> <span class="pl-smi">DenoPerm</span><span class="pl-kos">&gt;</span>
<span class="pl-k">type</span> <span class="pl-smi">PermId</span> <span class="pl-c1">=</span> <span class="pl-smi">ImportMapId</span> <span class="pl-c1">|</span> <span class="pl-smi">PlaceHolderImportId</span> <span class="pl-c1">|</span> <span class="pl-smi">WhatwgImportId</span><span class="pl-kos">;</span></pre></div>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ deno test
$ deno run ./hello.ts
$ deno run ./world.ts
$ deno compile ./hello.ts
$ deno compile ./world.ts"><pre class="notranslate">$ deno <span class="pl-c1">test</span>
$ deno run ./hello.ts
$ deno run ./world.ts
$ deno compile ./hello.ts
$ deno compile ./world.ts</pre></div>
<p dir="auto">With basic code such as this:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const baseDir = &quot;./&quot;;
const watcher = Deno.watchFs(baseDir);

for await (const event of watcher) {
 console.log(event);
}"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">baseDir</span> <span class="pl-c1">=</span> <span class="pl-s">"./"</span><span class="pl-kos">;</span>
<span class="pl-k">const</span> <span class="pl-s1">watcher</span> <span class="pl-c1">=</span> <span class="pl-v">Deno</span><span class="pl-kos">.</span><span class="pl-en">watchFs</span><span class="pl-kos">(</span><span class="pl-s1">baseDir</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-k">for</span> <span class="pl-k">await</span> <span class="pl-kos">(</span><span class="pl-k">const</span> <span class="pl-s1">event</span> <span class="pl-k">of</span> <span class="pl-s1">watcher</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
 <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">event</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">And then when I go ahead and change a file, <strong>just once!</strong>, I get three concecutive events that look like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
  kind: &quot;modify&quot;,
  paths: [ &quot;index.html.hbs&quot; ]
}
{
  kind: &quot;modify&quot;,
  paths: [ &quot;index.html.hbs&quot; ]
}
{
  kind: &quot;modify&quot;,
  paths: [ &quot;index.html.hbs&quot; ]
}"><pre class="notranslate"><code class="notranslate">{
  kind: "modify",
  paths: [ "index.html.hbs" ]
}
{
  kind: "modify",
  paths: [ "index.html.hbs" ]
}
{
  kind: "modify",
  paths: [ "index.html.hbs" ]
}
</code></pre></div>
<p dir="auto">Shouldn't I receive just one event since the file was changed just once?</p>
<hr>
<p dir="auto">deno 1.16.2 (release, aarch64-apple-darwin)<br>
v8 9.7.106.2<br>
typescript 4.4.2</p>