@peaske7/readit 0.3.2 → 0.3.3-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import open2 from "open";
|
|
|
19
19
|
// package.json
|
|
20
20
|
var package_default = {
|
|
21
21
|
name: "@peaske7/readit",
|
|
22
|
-
version: "0.3.
|
|
22
|
+
version: "0.3.3-rc.0",
|
|
23
23
|
description: "A CLI tool to review Markdown documents with inline comments",
|
|
24
24
|
author: "Jay Shimada <peaske@pm.me>",
|
|
25
25
|
license: "MIT",
|
|
@@ -1857,9 +1857,16 @@ Browser disconnected, shutting down...`);
|
|
|
1857
1857
|
const state = fileMap.get(targetPath);
|
|
1858
1858
|
if (!state)
|
|
1859
1859
|
return;
|
|
1860
|
+
if (eventType === "rename")
|
|
1861
|
+
state.needsRewatch = true;
|
|
1860
1862
|
if (state.debounceTimer)
|
|
1861
1863
|
clearTimeout(state.debounceTimer);
|
|
1862
1864
|
state.debounceTimer = setTimeout(async () => {
|
|
1865
|
+
if (state.needsRewatch) {
|
|
1866
|
+
state.needsRewatch = false;
|
|
1867
|
+
await rewatch(targetPath);
|
|
1868
|
+
return;
|
|
1869
|
+
}
|
|
1863
1870
|
try {
|
|
1864
1871
|
const newContent = await fs.readFile(targetPath, "utf-8");
|
|
1865
1872
|
if (!state.isLoaded || newContent !== state.content) {
|